used/free ips per scope on the DHCP Server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: used/free ips per scope on the DHCP Server

Post by mbellerue »

You will need a ` in the path to escape the space.

Code: Select all

check_DHCP_perscope = powershell.exe -command C:\Program` Files\NSClient++\scripts\check_DHCP_perscope.ps1
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: used/free ips per scope on the DHCP Server

Post by grayloglearn »

We got the output but we are not able to see in nagios all the rows which are showing in windows server after executing. The rows nearly 250 is showing once we executed the script in windows server. We are getting only limited like 10 rows.

[root@localhost~]# /usr/local/nagios/libexec/check_nrpe -H DHCPC -t 120 -c check_DHCP_perscope
OK: pool1 in good order. pool1 is 12% used, (19 leases, 135 IP's available.)
OK: pool1 in good order. pool1is 0% used, (1 leases, 233 IP's available.)
OK: pool2 in good order. pool2 is 0% used, (0 leases, 220 IP's available.)
OK: pool5 in good order. pool5 is 3% used, (6 leases, 214 IP's available.)
OK: pool6 in good order. pool6 is 0% used, (0 leases, 81 IP's available.)
OK: pool7 site in good order. pool7 site is 3% used, (6 leases, 214 IP's available.)
OK: pool8 in good order. pool8 is 0% used, (0 leases, 220 IP's available.)
OK: pool9 in good order. pool9 is 0% used, (0 leases, 220 IP's available.)
OK: pool10 in good order. pool10 is 0% used, (0 leases, 220 IP's available.)
OK: pool11 in good order. pool11 is 0% used, (0 leases, 220 IP's available.)


But it should show 250 + rows above. But its showing only 10 instead of 250. Can you help on this. Let us know if those many rows will not show in console.
Does it possible to make the graph for this i mean count??
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: used/free ips per scope on the DHCP Server

Post by mbellerue »

I think this is running into the maximum amount of data that NRPE will return on a single query. It can be increased, but it does require recompiling NRPE on the Nagios side.

Would it be better to just modify the script so that it doesn't output all 250+ lines? If DHCP scopes are OK, then there's nothing of value in seen all of the data, when you can just see that the service is green. Then when a scope goes to WARNING or CRITICAL, the script could output those scopes specifically.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: used/free ips per scope on the DHCP Server

Post by grayloglearn »

Shall we enable the performance graph/monitor for this.
We are calling the custom script from nagios shall we enable the performance graph/data for this for warning/critical?

Please find the attachment for this.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: used/free ips per scope on the DHCP Server

Post by scottwilkerson »

You custom script would have to return proper performance data.

Below is a document describing how to return performance data
https://nagios-plugins.org/doc/guidelines.html#AEN200
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: used/free ips per scope on the DHCP Server

Post by grayloglearn »

Hi Team,

The team want entire out put in nagios console. Let us know what we have to do to get the entire output. you said it can be increased as we are getting the only data for 11 lines when we call the script. Let us know where we have to change. please provide the answers for below.

After changing the values does it effect current monitoring??
Any load will increase ??
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: used/free ips per scope on the DHCP Server

Post by mbellerue »

I'm running the test on my side, and it looks like this isn't a limitation of check_nrpe, like I initially thought. The limiting factor is NSClient++. I am limited at about 120 rows when querying NSClient++. When querying a Linux machine running NRPE, I've gone as high as 300 rows.

So something else is stopping the output. Even if we find out what that is, you are going to be limited to about 120 rows of output.

What version of NSClient are you running?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: used/free ips per scope on the DHCP Server

Post by grayloglearn »

Hi Team,

we are using 0.5.2.35 that is latest version.
you mean to say we can see only 120 rows only in nagios console that is limited right?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: used/free ips per scope on the DHCP Server

Post by mbellerue »

No, the limiting factor is in NSClient. It looks like it might be a character limitation. I was able to return 120 rows with a very short message per row. If I increase the character count of the message, the number of rows that NSClient returns decreases. Whereas on a Linux machine with the NRPE client, I can still receive hundreds of lines even if I increase the length of the message returned.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: used/free ips per scope on the DHCP Server

Post by grayloglearn »

Could you please confirm that does nsclient is having some limitation on this ??
Locked