I am trying to use check_nt from a FreeBSD box to get values of performance counters on Windows 2003 boxes. I have nagios successfully working on the BSD server and am using check_nt both in nagios and in cacti to check hard drive space, memory and running processes. The problem is when I run check_nt from the command line and use any counter name, I always get a result of 0. I am using this syntax:
../libexec/check_nt -H servername -v COUNTER -l "\\Memory\\Available Bytes"
I tried with multiple counters, even with counters that were obviously misspelled like "\\mem\\ava" and I still get 0 as the result
Any ideas?
check_NT and W2k3
Moderators: Developers, Moderators
You could use perl to access WMI/performance counters. You don't need the nagios agent to do this(In fact, I don't like agents on servers since it's not necessary).
Example(look at the windows memory script): http://forums.cacti.net/about12383.html
It's very easy to find other Perfomance Counters using Scriptomatic: http://www.microsoft.com/downloads/deta ... 3b0f7d1178
One more thing: WMI needs authentication. See the thread above for more information.
Example(look at the windows memory script): http://forums.cacti.net/about12383.html
It's very easy to find other Perfomance Counters using Scriptomatic: http://www.microsoft.com/downloads/deta ... 3b0f7d1178
One more thing: WMI needs authentication. See the thread above for more information.
Sorry cdiaz, you're right.
I allways thought that you could use perl to access WMI from a Linux/BSD machine, but it seems that Win32::OLE does only work on windows.
In that case...why do people use (and install)perl to create scripts and not just vbscript(native)?
Anyway...you could try to install the Win32::OLE under WINE:
http://www.perlmonks.org/?node_id=430194
Or just install a windows box for Cacti(which is probably going to work better anyways). I have cacti graphing about 100 Windows boxes(and a lot of other devices), and it's working just great.
I allways thought that you could use perl to access WMI from a Linux/BSD machine, but it seems that Win32::OLE does only work on windows.
In that case...why do people use (and install)perl to create scripts and not just vbscript(native)?
Anyway...you could try to install the Win32::OLE under WINE:
http://www.perlmonks.org/?node_id=430194
Or just install a windows box for Cacti(which is probably going to work better anyways). I have cacti graphing about 100 Windows boxes(and a lot of other devices), and it's working just great.
Who is online
Users browsing this forum: No registered users and 4 guests