@@ -27,6 +27,8 @@ class ObsoletePluginsFilter < Fluent::Plugin::Filter
2727 config_param :obsolete_plugins_yml , :string , default : nil , deprecated : "use plugins_json parameter instead"
2828 desc "Path to plugins.json"
2929 config_param :plugins_json , :string , default : PLUGINS_JSON_URL
30+ desc "Timeout value to read data of obsolete plugins"
31+ config_param :timeout , :integer , default : 5
3032 desc "Raise error if obsolete plugins are detected"
3133 config_param :raise_error , :bool , default : false
3234
@@ -35,12 +37,16 @@ def configure(conf)
3537
3638 obsolete_plugins =
3739 if @obsolete_plugins_yml
38- ObsoletePluginsUtils . obsolete_plugins_from_yaml ( @obsolete_plugins_yml )
40+ ObsoletePluginsUtils . obsolete_plugins_from_yaml ( @obsolete_plugins_yml , timeout : @timeout )
3941 else
40- ObsoletePluginsUtils . obsolete_plugins_from_json ( @plugins_json )
42+ ObsoletePluginsUtils . obsolete_plugins_from_json ( @plugins_json , timeout : @timeout )
4143 end
4244
4345 ObsoletePluginsUtils . notify ( log , obsolete_plugins , raise_error : @raise_error )
46+ rescue Fluent ::ConfigError
47+ raise
48+ rescue
49+ # ignore other exception
4450 end
4551
4652 def filter ( tag , time , record )
0 commit comments