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
Branches
Tags
No related merge requests found
......@@ -329,8 +329,11 @@ def cli(
logger.exception(
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:
# Exit code 1 indicates WARNING in Sensu
raise click.ClickException(
"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