Trying to run a SSH plugin by way of NCPA
Posted: Wed Dec 04, 2019 8:36 am
Hi,
I'm hoping I just don't have the check formatted correctly and it's an easy fix
The situation :
work wants to basically shut down unnecessary ssh logins to hosts as a security issue
the NCPA cpu/percentage check just does not cut it, if one of the cpus is under load, it alerts and spams everyone even if i set the arguments to 90/95 percent
the old ssh check_load plugin works just fine and doesn't alert all the time
I thought if I dropped the plugin in the /usr/local/ncpa/plugins directory, I could run it by way of ncpa
When I run the check from the nagios instance i get failures, and not sure why
The first is could not parse arguments
/usr/local/nagios/libexec/check_ncpa.py -H hostweb01.example.net -t 'mytoken' -P 5693 -M plugins/check_load -w 30,30,30 -c 50,50,50
check_load: Could not parse arguments
Usage:check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
So I start using quotes to gather them together and that fails
/usr/local/nagios/libexec/check_ncpa.py -H hostweb01.example.net -t 'mytoken' -P 5693 -M plugins/"check_load -w 30,30,30 -c 50,50,50"
The plugin (check_load -w 30,30,30 -c 50,50,50) requested does not exist. You may be trying to access the 'check_load' node.
No matter where I put the quotes, or if I change them to single ticks it still fails
Can you tell me where I'm screwing up?
Thank you in advance
Jen
I'm hoping I just don't have the check formatted correctly and it's an easy fix
The situation :
work wants to basically shut down unnecessary ssh logins to hosts as a security issue
the NCPA cpu/percentage check just does not cut it, if one of the cpus is under load, it alerts and spams everyone even if i set the arguments to 90/95 percent
the old ssh check_load plugin works just fine and doesn't alert all the time
I thought if I dropped the plugin in the /usr/local/ncpa/plugins directory, I could run it by way of ncpa
When I run the check from the nagios instance i get failures, and not sure why
The first is could not parse arguments
/usr/local/nagios/libexec/check_ncpa.py -H hostweb01.example.net -t 'mytoken' -P 5693 -M plugins/check_load -w 30,30,30 -c 50,50,50
check_load: Could not parse arguments
Usage:check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
So I start using quotes to gather them together and that fails
/usr/local/nagios/libexec/check_ncpa.py -H hostweb01.example.net -t 'mytoken' -P 5693 -M plugins/"check_load -w 30,30,30 -c 50,50,50"
The plugin (check_load -w 30,30,30 -c 50,50,50) requested does not exist. You may be trying to access the 'check_load' node.
No matter where I put the quotes, or if I change them to single ticks it still fails
Can you tell me where I'm screwing up?
Thank you in advance
Jen