After Feed Utility finishes its execution, it indicates success, partial success, or failure with a return code. A return code can have one of the values described below.
Return code values
Feed Utility returns the following values:
0
Success.
All the actions were successfully performed by Feed Utility.
For example, Feed Utility is configured to download and process two feeds, and both feeds were successfully downloaded and processed.
1
Failure.
All the actions performed by Feed Utility failed or could not be performed.
For example, Feed Utility is configured to download and process two feeds, and Feed Utility could not download any feeds because of a network error.
This value is returned when no records are written to any of the processed feed files because of the filtering rules.
2
Partial success.
Some of the actions were successfully performed by Feed Utility.
For example, Feed Utility is configured to download and process two feeds, and Feed Utility successfully downloaded and processed only one of the feeds.
This value is also returned when no records are written to one of the resulting feed files because of the filtering rules.
3
Nothing to download.
This value is returned in the following cases:
enabled
attribute in the Feed Utility configuration file is false
)Output example (Linux)
The following example demonstrates receipt of a return code after Feed Utility has finished downloading and processing feeds. In this example, Feed Utility returns a value for partial success, because filtering rules for Botnet CnC URL Data Feed do not match any records in the original feed.
/opt/feed_util/bin $ ./kl_feed_util
2017-04-10 16:30:48.568 KL Feed Utility, version: 1.0.37.0/Release 2017-04-10 16:30:50.811 feed #66(Malicious_Hash_Data_Feed) version 2017-04-10T13:22:16.92 is available 2017-04-10 16:30:50.821 feed #65(Botnet_CnC_URL_Data_Feed) version 2017-04-10T13:23:33.403 is available 2017-04-10 16:30:57.912 update of feed #65(Botnet_CnC_URL_Data_Feed) is extracted to /opt/feed_util/bin/tmp/Botnet_CnC_URL_Data_Feed.json 2017-04-10 16:31:09.448 update of feed #66(Malicious_Hash_Data_Feed) is extracted to /opt/feed_util/bin/tmp/Malicious_Hash_Data_Feed.json 2017-04-10 16:31:09.449 2 of 2 feeds downloaded 2017-04-10 16:31:14.984 failed to process feed #65(Botnet_CnC_URL_Data_Feed): there is nothing to write with the current filtration settings 2017-04-10 16:31:35.610 1 of 2 feeds processed
/opt/feed_util/bin $ echo $?
2 |
Output example (Windows)
The following example demonstrates receipt of a return code after Feed Utility has finished downloading and processing feeds. In this example, Feed Utility returns a value for partial success, because filtering rules for Botnet CnC URL Data Feed do not match any records in the original feed.
C:\feed_util\bin>call kl_feed_util.exe && (echo Success.) || (echo Error or partial success.)
2017-05-03 15:56:08.393 KL Feed Utility, version: 1.0.56.0/Release 2017-05-03 15:56:08.656 feed #87(Demo_IP_Reputation_Data_Feed) version 2017-03-28T10:59:41.05 is available 2017-05-03 15:56:08.692 feed #85(Demo_Botnet_CnC_URL_Data_Feed) version 2017-03-28T10:57:25.897 is available 2017-05-03 15:56:09.679 update of feed #87(Demo_IP_Reputation_Data_Feed) is extracted to C:\feed_util\bin\tmp\Demo_IP_Reputation_Data_Feed.json 2017-05-03 15:56:09.900 update of feed #85(Demo_Botnet_CnC_URL_Data_Feed) is extracted to C:\feed_util\bin\tmp\Demo_Botnet_CnC_URL_Data_Feed.json 2017-05-03 15:56:09.915 2 of 2 feeds downloaded 2017-05-03 15:56:09.929 start processing of feed #85(Demo_Botnet_CnC_URL_Data_Feed) 2017-05-03 15:56:09.939 start processing of feed #87(Demo_IP_Reputation_Data_Feed) 2017-05-03 15:56:09.980 failed to process feed #85(Demo_Botnet_CnC_URL_Data_Feed): there is nothing to write with the current filtration settings 2017-05-03 15:56:10.028 1 of 2 feeds processed Error or partial success. |