Skip to content
Snippets Groups Projects
Commit 70803328 authored by Pelle Koster's avatar Pelle Koster
Browse files

get-interface-stats error code to match sensu's expectations

parent c44119f5
No related branches found
No related tags found
No related merge requests found
...@@ -329,8 +329,11 @@ def cli( ...@@ -329,8 +329,11 @@ def cli(
logger.exception( logger.exception(
f"Error while processing {str(vendor).capitalize()} router {router_fqdn}" f"Error while processing {str(vendor).capitalize()} router {router_fqdn}"
) )
# Exit code 2 indicates CRITICAL in Sensu
raise click.exceptions.Exit(2)
if error_counter.count: if error_counter.count:
# Exit code 1 indicates WARNING in Sensu
raise click.ClickException( raise click.ClickException(
"Errors were encountered while processing interface stats" "Errors were encountered while processing interface stats"
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment