we have seen that check_nt is having some limitations so that you suggest on check_ncpa.
Now if i run the command check_nt with different scopes i am able to get the data. Please find the below.
[nagios@nagiu ~]$ /usr/local/nagios/libexec/check_nrpe -H XXXX -t 120 -c check_DHCP_perscope -a 172.31.113.0,172.31.112.0,172.31.114.0,172.31.115.0,172.31.116.0
OK: 38-scope-data Vlan 420 in good order. 38-scope-data Vlan 420 is 47% used, (104 leases, 116 IP's available.) |'FreeIPS'=116 'LeaseIPS'=104;0 '38-scope-Level3-Data'=0 'Vlan'=0 '310'=0 'in'=0 'good'=0 'order.'=0 '38-scope-Level3-Data'=0 'Vlan'=0 '310'=0 'is'=0 '88%'=0 'used,'=0 '(193'=0 'leases,'=0 '27'=0 'IP's'=0 'available.)'=0 '|'=0 'FreeIPS'=27 'LeaseIPS'=193;0 '38-scope-Level4-Data'=0 'Vlan'=0 '410'=0 'in'=0 'good'=0 'order.'=0 '38-scope-Level4-Data'=0 'Vlan'=0 '410'=0 'is'=0 '78%'=0 'used,'=0 '(171'=0 'leases,'=0 '49'=0 'IP's'=0 'available.)'=0 '|'=0 'FreeIPS'=49 'LeaseIPS'=171;0 '38-scope-LevelG-Voice'=0 'Vlan'=0 '520'=0 'in'=0 'good'=0 'order.'=0 '38-scope-LevelG-Voice'=0 'Vlan'=0 '520'=0 'is'=0 '0%'=0 'used,'=0 '(0'=0 'leases,'=0 '220'=0 'IP's'=0 'available.)'=0 '|'=0 'FreeIPS'=220 'LeaseIPS'=0;0 '38-scope-Level5-Data'=0 'Vlan'=0 '510'=0 'in'=0 'good'=0 'order.'=0 '38-scope-Level5-Dat
I thought that ncpa is more capability than nsca. But ncpa is also not giving the output for multiple scopes. I understand you have some limitation but we have to resolve this.
Even if we call "/usr/local/nagios/libexec/check_ncpa.py -H 172.31.94.235 -t Test@123 -P 5693 -M 'plugins/dhcpncpa.ps1' -q "args=-all"
All scopes are not showing in nagios console.
Does ncpa does not have capabilities to call multiple scopes ? or plugin does not have capabilites?
Passive check configuration with ncpa and nsca
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: Passive check configuration with ncpa and nsca
In one of the previous posts you showed us "check_DHCP_perscope" defined this way:
So, is check_DHCP_perscope.ps1 (that you are calling via check_nrpe and NSClient++) and dhcpncpa.ps1 (that you are calling via check_ncpa.py) the SAME script?
Can you upload the script that you are using on the forum?
Code: Select all
check_DHCP_perscope = powershell.exe -command C:\Program` Files\NSClient++\scripts\check_DHCP_perscope.ps1 -s $ARG1$
Can you upload the script that you are using on the forum?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: Passive check configuration with ncpa and nsca
Hi team,
Yes, the script is same as you suggest i am working on ncpa instead of nsca as its have some limitation. The script is also same.
Yes, the script is same as you suggest i am working on ncpa instead of nsca as its have some limitation. The script is also same.
Re: Passive check configuration with ncpa and nsca
Can you upload the script that you are using on the forum?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: Passive check configuration with ncpa and nsca
Hi Please find the attachment for the script.
You do not have the required permissions to view the files attached to this post.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Passive check configuration with ncpa and nsca
There is a problem with the comma as a seperator in the way NCPA works, but I did create a workaround for you
attached is the text for a slightly modified dhcpncpa.ps1 which uses a semi-colon as a separator
call with
attached is the text for a slightly modified dhcpncpa.ps1 which uses a semi-colon as a separator
call with
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 172.31.94.235 -t Test@123 -P 5693 -M 'plugins/dhcpncpa.ps1' -q 'args=-s 172.31.113.0;172.31.112.0;172.31.114.0;172.31.115.0;172.31.116.0'
You do not have the required permissions to view the files attached to this post.