CUSTOM_PLUGIN
Posted: Mon Jul 27, 2020 8:12 am
Hello,
I am using Nagios XI and I am monitoring a Windows Host with NCPA client.
I have developed a python script which give me if a licence of one of the software installed on this windows machine is up to date or not.
My script is named "check_opc.py" and it takes 3 arguments -s $ARG1$ -n $ARG2$ and -v $ARG3$
On my windows machine, using PowerShell when I execute this plugin like that :
C:\Program Files\Nagios\NCPA\plugins> python .\check_opc.py -s opc.tcp://127.0.0.1:49320 -n "ns=2;s=_System._LicensedFeatures" -v "['Allen-Bradley ControlLogix Ethernet']"
This is the output that I get (it is correct)
Unable to read ['Allen-Bradley ControlLogix Ethernet'] in node ns=2;s=_System._LicensedFeatures from opc.tcp://127.0.0.1:49320
I want to see this output on my Nagios Server GUI
I Have my custom plugin in the NCPA plugins directory of the client(windows). However, I can't run the pluging remotely from Nagios. Here is the command that I am using
root@ubuntu:/usr/local/nagios/libexec# ./check_ncpa.py -H ServerAddressNCPA -t mytoken -P 5693 -M 'plugins/check_opc.py' -a '-s opc.tcp://127.0.0.1:49320 -n "ns=2;s=_System._LicensedFeatures" -v "['Allen-Bradley ControlLogix Ethernet']"'
but I got this error:
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
I have tried so many ways to write the command in different ways, but nothing seems to be resolving the problem. ANY HELP !!!!!!!!!
Thank you
I am using Nagios XI and I am monitoring a Windows Host with NCPA client.
I have developed a python script which give me if a licence of one of the software installed on this windows machine is up to date or not.
My script is named "check_opc.py" and it takes 3 arguments -s $ARG1$ -n $ARG2$ and -v $ARG3$
On my windows machine, using PowerShell when I execute this plugin like that :
C:\Program Files\Nagios\NCPA\plugins> python .\check_opc.py -s opc.tcp://127.0.0.1:49320 -n "ns=2;s=_System._LicensedFeatures" -v "['Allen-Bradley ControlLogix Ethernet']"
This is the output that I get (it is correct)
Unable to read ['Allen-Bradley ControlLogix Ethernet'] in node ns=2;s=_System._LicensedFeatures from opc.tcp://127.0.0.1:49320
I want to see this output on my Nagios Server GUI
I Have my custom plugin in the NCPA plugins directory of the client(windows). However, I can't run the pluging remotely from Nagios. Here is the command that I am using
root@ubuntu:/usr/local/nagios/libexec# ./check_ncpa.py -H ServerAddressNCPA -t mytoken -P 5693 -M 'plugins/check_opc.py' -a '-s opc.tcp://127.0.0.1:49320 -n "ns=2;s=_System._LicensedFeatures" -v "['Allen-Bradley ControlLogix Ethernet']"'
but I got this error:
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
I have tried so many ways to write the command in different ways, but nothing seems to be resolving the problem. ANY HELP !!!!!!!!!
Thank you