Cacti & NetSaint/Nagios NSClient Scripts to monitor Wind

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Leonardo
Posts: 10
Joined: Thu Dec 23, 2004 1:27 pm
Location: RS Brasil

Post by Leonardo »

...
cleaner
Posts: 36
Joined: Mon Feb 28, 2005 10:12 am

Post by cleaner »

Is anyone using this?
Swad
Posts: 7
Joined: Fri Oct 15, 2004 10:39 am

Post by Swad »

I'm trying to, but not succeeding. I'm trying to use the package Caliban put together with the perl scripts and templates, but I can't get the CPU load one to work. From a command line I can successfully query a server for CPU load average just fine with the proper check_nt statement, but something isn't translating properly in Cacti as I get nothing but a flatlined graph for the CPU graph. The memory one that was provided works fine.

I'm going to guess something is up in the templates somewhere, but I don't know enough working with Cacti to figure this out.
raul.macian
Posts: 18
Joined: Fri Jun 03, 2005 6:42 am

Post by raul.macian »

I tryed to monitor the memory of one w2k box but I am getting this error in the graph managment:

RRDTool Says:

ERROR: can't parse '#FF4105:'

FF4105 is the color selected on the graph template to display the area, whenever I change the color the error changes too.

I can execute the perl script and get the correct values
Alives
Cacti User
Posts: 103
Joined: Mon Jul 11, 2005 11:39 am

Post by Alives »

its a bad map to the data source...thats just the line where it tries to map the datasource
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

It's making me crazy!!!

Post by Diggit2001 »

Hey everybody. I have no idea what the heck I'm doing wrong here and would appreciate any help that anyone can throw my way. I have installed the nsclient on one of my servers and using the scripts and other info from this thread, I have had success with getting hard drive, memory and Exchange Information Store stats to graph in cacti. I am having problems getting the CPU load script to work, however. I can run it from a terminal session no problem and it returns data. In cacti, it jut says "nan" and I get no results whatsoever. I've seen that another user has had pretty much this same problem, but I have not seen a solution.

I am running Cacti on Linux and I am a Linux noob, so it is completely possible that I am doing something wrong. I just don't understand why everything else is working and this one particular item is not.

Please help before I go mad!!!

Thanks! :D
shielderman
Posts: 6
Joined: Wed Jul 20, 2005 4:01 am

Post by shielderman »

Hi all

Just new here.

How do I create a new Graph template the above scripts's?
Can some one get me a screen shot?
shielderman
Posts: 6
Joined: Wed Jul 20, 2005 4:01 am

Post by shielderman »

I hav'e got everything working, but the graphs for this....not done.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Instructions

Post by spoonman »

Can someone post newer instructions on using these perl scripts with NSclient. I understand the scripts, can use them just need help with adding all necessary parts for cacti. LIke step one create input methods and so on with a new version of cacti. Like at least version .8.6d /// The previous examples are good and helpful but loose me somewhat since this post is a year old.

Thanks to anyone who helps!
zbose
Posts: 14
Joined: Tue Aug 02, 2005 4:46 pm

Re: Instructions

Post by zbose »

spoonman wrote:Can someone post newer instructions on using these perl scripts with NSclient. I understand the scripts, can use them just need help with adding all necessary parts for cacti. LIke step one create input methods and so on with a new version of cacti. Like at least version .8.6d /// The previous examples are good and helpful but loose me somewhat since this post is a year old.

Thanks to anyone who helps!
Are you still having trouble with this? If you are, I can attempt to write a walk through.

-zb
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Thanks .........I think I'm getting it now!! It may not hurt to have something posted. I'll probably post some of the stuff i've been doing with NSCLient and check_nt.


Thanks again. I am graphing using it though!!
zbose
Posts: 14
Joined: Tue Aug 02, 2005 4:46 pm

Make your own scripts for WMI counters

Post by zbose »

Make your own scripts for other WMI counters

I don't know if anyone else took awhile to figure this out, so I will give a quick step by step using a new Terminal Server Monitoring graph as an example.

1) Figure out what you want to monitor in Windows (we want to monitor Terminal Services for this example)

2) Open up the Peformance snap in (in Windows) and browse the list of counters. Add the ones you want to get a feel for how it will look on your graph. In this case we add Terminal Services -> Active Sessions and Inactive Sessions.

3) Once you have chosen your counters, right click on one and select properties. You should see something like:

Code: Select all

\\servername\Terminal Services\Active Sessions
\\servername\Terminal Services\Inactive Sessions
4) You probably have alread guessed it, but thats the path we are going to use with the check_nt tool. So now we will drop those values into the script we lifted from some helpful folks a page or two ago (note that we use \\ instead of a single \, also make sure to replace PASSWORD and PORTNUMBER with your specifics):

Code: Select all

#!/usr/bin/perl

$active_sessions= `/usr/lib/nagios/plugins/check_nt -H $ARGV[0] -p PORTNUMBER -s PASSWORD -v COUNTER -l "\\Terminal Services\\Active Sessions"`;
chomp $active_sessions;

$inactive_sessions= `/usr/lib/nagios/plugins/check_nt -H $ARGV[0] -p PORTNUMBER -s PASSWORD -v COUNTER -l "\\Terminal Services\\Inactive Sessions"`;
chomp $inactive_sessions;

print "active:$active_sessions inactive:$inactive_sessions\n";
5) Now we run through the tutorial earlier on in this thread. The key differences will be in the Data Input Methods configuration. We will use the values "active" and "inactive" as our output fields.

Sooo... You can use the above method to generate a script for ANY of those counters you can browse to in windows. Hope that helps someone. Took me a while to figure out where to find those \\paths\.

-zbose
zbose
Posts: 14
Joined: Tue Aug 02, 2005 4:46 pm

Post by zbose »

I also have a question for others doing this type of monitoring:

Up until now, I have only been using check_nt to check hosts that I have SNMP on (win2k3 servers). Cacti can grab the network IF through SNMP (or anything else that SNMP offers) and I am using check_nt scripts to get WMI counter data.

My question: Can I get cacti to run the check_nt scripts for hosts that do not have SNMP enabled (ie win2k servers?). Cacti seems to think the host is down if it can't run any SNMP queries against it, and it won't run the rest of the scripts (at least that is how it seems to be behaving for me).

Thanks,
zb
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

I had that same issue where my settings were set to poll via snmp only and if snmp messed up the device was considered down// All graphs stop... I changed my setting to PING and SNMP so that if snmp service hangs or stops for some reason the graphs that are run via check_nt should not stop // I only use snmp to grab NIC stats// I also set my ping option to ICMP, and yes i do use root to run cacti so that's not an issue/
zbose
Posts: 14
Joined: Tue Aug 02, 2005 4:46 pm

Post by zbose »

spoonman wrote:I had that same issue where my settings were set to poll via snmp only and if snmp messed up the device was considered down// All graphs stop... I changed my setting to PING and SNMP so that if snmp service hangs or stops for some reason the graphs that are run via check_nt should not stop // I only use snmp to grab NIC stats// I also set my ping option to ICMP, and yes i do use root to run cacti so that's not an issue/
Excellent idea. I just changed the setting and will see if it works.

Is there an advantage to using the ICMP ping instead of the UDP one?

BTW, Spoonman, are you in Seattle? Referencing the real spoonman? hehe.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests