Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thresholds for check-licenses sla_remaining_days make no sense #333

Open
ggiesen opened this issue Jul 25, 2024 · 0 comments
Open

Thresholds for check-licenses sla_remaining_days make no sense #333

ggiesen opened this issue Jul 25, 2024 · 0 comments

Comments

@ggiesen
Copy link

ggiesen commented Jul 25, 2024

So if I run the plugin with no explicit thresholds, then defaults of 7 days for warning and 2 days for critical make sense (79 days remaining means it's OK):

/usr/lib64/nagios/plugins/check_nwc_health -H <removed> --mode check-licenses --community <removed> --verbose
OK - entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized, compliance status is AUTHORIZED, authorization will expire in 79 days
checking keys
entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized
Registration status is registrationCompleted
compliance status is AUTHORIZED
authorization will expire in 79 days | 'sla_remaining_days'=79;7:;2:;;

However, if I explicitly set the thresholds:

/usr/lib64/nagios/plugins/check_nwc_health -H <removed> --mode check-licenses --community <removed> --verbose --warningx 'sla_remaining_days'=7 --criticalx 'sla_remaining_days'=2
CRITICAL - authorization will expire in 79 days, entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized, compliance status is AUTHORIZED
checking keys
entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized
Registration status is registrationCompleted
compliance status is AUTHORIZED
authorization will expire in 79 days | 'sla_remaining_days'=79;7;2;;

I get a CRITICAL result (for the same thresholds).

Furthermore, it looks like it's expecting the threshold to be higher rather than lower (which is the opposite of what it should be - more days left = better):

Setting the warningx threshold lower than the current value results in WARNING:

/usr/lib64/nagios/plugins/check_nwc_health -H <removed> --mode check-licenses --community <removed> --verbose --warningx 'sla_remaining_days'=78
WARNING - authorization will expire in 79 days, entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized, compliance status is AUTHORIZED
checking keys
entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized
Registration status is registrationCompleted
compliance status is AUTHORIZED
authorization will expire in 79 days | 'sla_remaining_days'=79;78;2:;;

Set the warningx threshold higher than the current value results in OK:

$ /usr/lib64/nagios/plugins/check_nwc_health -H <removed> --mode check-licenses --community <removed> --verbose --warningx 'sla_remaining_days'=80
OK - entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized, compliance status is AUTHORIZED, authorization will expire in 79 days
checking keys
entitlement ISR_1100_8P_Security for feature Cisco 1100 Series with 8 LAN Ports, Security License mode is authorized
Registration status is registrationCompleted
compliance status is AUTHORIZED
authorization will expire in 79 days | 'sla_remaining_days'=79;80;2:;;
@ggiesen ggiesen changed the title Thresholds for check-licences sla_remaining_days make no sense Thresholds for check-licenses sla_remaining_days make no sense Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant