Network Interface Utilization on Windows Servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Network Interface Utilization on Windows Servers

Post by sreinhardt »

I have tested on a couple different systems, and have not run into the same situation. At this point I think it is either an issue with escaping or possibly illegal characters that we disallow from xi. So to verify, this command does work from the cli?

Code: Select all

/usr/local/nagios/libexec/check_nt -H ip.addr -s password -p 12489 -v COUNTER -l "\\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Sent/sec" -w 1000000 -c 3000000
And this is how you have it presently defined in nagios?

Code: Select all

command "check_nic" = "$USER1$/check_nt -H $HOSTADDRESS$ -s $ARG1$ -p 12489 -v COUNTER -l $ARG2$"

Service arguments: 
$ARG1$ = password
$ARG2$ = "\\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Sent/sec"
$ARG3$ = -w 1000000 -c 3000000
You might, although not necessarily, need to add an $ARG3$ to the end of your command to include the last argument. As a second thought, have you verified that the host address provided from the host, is the same as the IP you manually enter? Finally, could you share the service config file just to verify nothing is getting mis-saved or altered upon save? Feel free to sanitize as needed.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Network Interface Utilization on Windows Servers

Post by joe.ward »

The code you included is correct except in the GUI there is fact a $ARG3$ as you suggested.

Command line on the Nagios server works fine for multiple IP addresses. There are no local hosts table entries and the host is given by IP address so I do not see how the server could be using different IP addresses.

$ /usr/local/nagios/libexec/check_nt -H ip.addr -s passwd -p 12489 -v COUNTER -l "\\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Sent/sec" -c 11000000 -w 10000000
449072

You asked for a copy of the service config file. I'm still new to Nagios. What path please?

Is there a log file somewhere that records the commands that Nagios is using to make the check (from the configuration GUI) so I can see the escaping that it uses? It works from the LINUX command line.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Network Interface Utilization on Windows Servers

Post by sreinhardt »

The code you included is correct except in the GUI there is fact a $ARG3$ as you suggested.
Oops, quite right you are I did forget to add that in the definition.

Probably the easiest way to get us a copy of the configuration would be to PM one of us the profile.zip from the admin page. As for logs, I think the best place to look would be in the nsclient logs, if they are enabled. This way you can see what is actually see what nsclient sees as being sent and is trying to run.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Network Interface Utilization on Windows Servers

Post by joe.ward »

Hello Spenser, Did you receive the PM with the requested information a couple of weeks ago? How can we make progress on this topic?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Network Interface Utilization on Windows Servers

Post by sreinhardt »

I did, my apologies I thought I had responded here. As you expected, everything looks great in your configs. Let's try a few commands from CLI and that windows machine to see if we can find anything. You did have me for a second with the password in there, then I realized that it does not have a ! but a 1, not sure how I interpreted that wrong at first. :D

Code: Select all

cd /usr/local/nagios/libexec
./check_nt -H [host\IP here] -s [Password here] -p 12489 -v COUNTER -l "\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Sent/sec" -c 11000000 -w 10000000
./check_nt -H [host\IP here] -s [Password here] -p 12489 -v COUNTER -l "\\Network Interface(Intel[R] PRO_1000 MT Network Connection)\\Bytes Sent/sec" -c 11000000 -w 10000000
On the windows machine, open up a powershell terminal and run:

Code: Select all

get-counter
get-counter "\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Sent/sec"
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Network Interface Utilization on Windows Servers

Post by joe.ward »

The check_nt commands return "0"

On the Windows server, get-counter '\Network..." returns 31168.6037248831
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Network Interface Utilization on Windows Servers

Post by slansing »

When you run this command, do you see any errors or issues in the nsclient.log file in your installation directory?
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Network Interface Utilization on Windows Servers

Post by joe.ward »

I do not find nsclient.log on any of the file systems.

I searched with "find / -name nsclient.log -ls". I repeated it for all of the local file systems even if I did not think it would be there. No log file was found.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Network Interface Utilization on Windows Servers

Post by sreinhardt »

The nsclient log, would be on your remote windows system not on the nagios server. It would likely be stored in the nsclient program files directory.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Network Interface Utilization on Windows Servers

Post by joe.ward »

OK - I backed up to the last set of tests.

On the Windows client, in PowerShell window:
  • PS C:\Users\admin> get-counter "\Network Interface(intel[R] PRO_1000 MT Network Connection)\Bytes Sent/sec"

    Timestamp CounterSamples
    --------- --------------
    10/29/2013 2:50:39 PM \\wvusstlopsbo1\network interface(intel[r] pro_1000 mt network connection)\bytes sent/sec :
  • 56475.03845303
From CLI on the Nagios server:
  • $ ./check_nt -H [IP] -s [password] -p 12489 -v COUNTER -l "\Network Interface(Intel[R] PRO_1000 MT Network Connection)\\Bytes Sent/sec"
    469096
So I try the CLI command syntax in Core Config when defining the service, and "Test Check Command" gives:
  • COMMAND: /usr/local/nagios/libexec/check_nt -H [IP] -s [password] -p 12489 -v COUNTER -l "\\Network Interface\(Intel\[R\] PRO_1000 MT Network Connection\)\\\\Bytes Sent/sec"
    OUTPUT: 0
Knowing that the Test Check Command uses different escaping than the real check will use, I configure the Service, go to Home, Details, Service Details, and schedule immeidate test. It comes back green dot with a white check mark, and value zero :-(

How do I translate CLI to actual Nagios configuration GUI settings?
Locked