plethora of windows nsclient scripts

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

Moderators: Developers, Moderators

Extremo
Posts: 1
Joined: Wed Oct 03, 2007 12:21 am

Post by Extremo »

mcutting wrote:Hi everyone,

I've uploaded the perl scripts into Cacti/Scripts, and also have a copy of check_nt running in there. I can't seem to get any data out of these ? I've modified the data input methods so that the PERL path is /usr/bin/perl, but it still doesn't seem to work. I get the following on my graphs (see attached). I can also see the following in the cacti log

11/27/2006 02:35:26 PM - CACTID: Poller[0] Host[4] DS[47] SCRIPT: perl /var/www/html/scripts/nt_perfmon.pl 10.24.0.12 "\\Memory\Page Faults/sec", output: U

Can anyone help ? I'm using CACTID as the poller...
Hi,

This might be a tad late, but double-check the path to check_nt, I had that issue this morning with my Cacti configuration... I've got my own issue with nt_cpu.pl at the moment, the check takes place, but the Perl scripting removes all of the useful data, hence it returns nothing :roll:
ckrimmel
Posts: 5
Joined: Wed Apr 23, 2008 3:17 pm

Post by ckrimmel »

I'm surprised that a lot of people were able to get these graphs working...


Initially I ran into the following error: "the RRD does not contain an RRA matching the chosen CF" This was fixed by changing "LAST" to "AVERAGE". It doesn't give me live data but its close enough to get an idea.

Now I'm running into an issue where I am getting nothing but zero's back on several of the graphs, if not all, including Disk Queue Length which I know isn't at zero. Other things I had to do included copying check_nt from Nagios to the cacti directory and also updating the cacti directory in all of the perl scripts.

Is there anything else people did to get these working? I'm running out of ideas and I would love to use the information available through these queries. Thank you!
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

I use quite a few of these scripts..have been for quite a while.>> So make sure your location of the check_nt is in the location of where its stated in all the scripts...make sure you have permissions to call the script and run it. It should work fine? Let me know if you have any questions..i can show you some graphs if you like........
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

ckrimmel wrote:I'm surprised that a lot of people were able to get these graphs working...


Initially I ran into the following error: "the RRD does not contain an RRA matching the chosen CF" This was fixed by changing "LAST" to "AVERAGE". It doesn't give me live data but its close enough to get an idea.

Now I'm running into an issue where I am getting nothing but zero's back on several of the graphs, if not all, including Disk Queue Length which I know isn't at zero. Other things I had to do included copying check_nt from Nagios to the cacti directory and also updating the cacti directory in all of the perl scripts.

Is there anything else people did to get these working? I'm running out of ideas and I would love to use the information available through these queries. Thank you!
Googling for the highlighted phrase returns this thread as the first hit. On the second page, there's a reply from Gandalf that says what you need to do to resolve that issue.

http://forums.cacti.net/viewtopic.php?t ... c&start=15

Have you tried running the scripts in question from the command line to see what kind of data they're returning?
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
ckrimmel
Posts: 5
Joined: Wed Apr 23, 2008 3:17 pm

Post by ckrimmel »

::EDIT:: My response to spoon came at almost the same time as your response streaker. I'll look through the link you provided, THANK YOU, and I'll let you know what I get.

I edited the scripts so that they point to check_nt in the appropriate directory. I've also run the scripts via CLI to verify they work and most of them (minus SQL connections and memory) return a zero.



ADDITION:: Thank you for the reply with the forum thread Streaker. This resolved the graphs not appearing, thank you. The problem remains that I'm getting a value of 0 for items such as Disk Queue Length and most other scripts.

From CLI:

Code: Select all

perl /var/www/cacti/scripts/nt_perfmon.pl **SYS FQDN EDITED OUT** "\\PhysicalDisk(_Total)\Current Disk Queue Length" 
0
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

ckrimmel wrote:::EDIT:: My response to spoon came at almost the same time as your response streaker. I'll look through the link you provided, THANK YOU, and I'll let you know what I get.

I edited the scripts so that they point to check_nt in the appropriate directory. I've also run the scripts via CLI to verify they work and most of them (minus SQL connections and memory) return a zero.

Thank you for your responses, I'll get back to you shortly!
If the scripts are returning a zero, then it sounds as though you don't have the NSClient running on the machines you're attempting to poll.

You actually have two problems.

1. The missing Consolidation

2. Scripts returning Zero.

I just wanted to point that out, so you don't think fixing one will fix the other.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
ckrimmel
Posts: 5
Joined: Wed Apr 23, 2008 3:17 pm

Post by ckrimmel »

I did the consolidation fix on SQL connections and verify that was the problem. Thank you.

Also, I've verified that NSCLIENT is installed and working on the system in question. I've actually been using NSCLIENT for about three years on all of our system to check different things such as file age, exchange queues, dns, services running, etc. without any problems at all. [CONFUSED]Any other ideas why I would be getting a zero for everything but SQL Connections??[/CONFUSED] Thank you again!
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

ckrimmel wrote:I did the consolidation fix on SQL connections and verify that was the problem. Thank you.

Also, I've verified that NSCLIENT is installed and working on the system in question. I've actually been using NSCLIENT for about three years on all of our system to check different things such as file age, exchange queues, dns, services running, etc. without any problems at all. [CONFUSED]Any other ideas why I would be getting a zero for everything but SQL Connections??[/CONFUSED] Thank you again!
See if this helps.

http://forums.cacti.net/viewtopic.php?t ... ight=works
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
ckrimmel
Posts: 5
Joined: Wed Apr 23, 2008 3:17 pm

Post by ckrimmel »

Thank you again for your response. The code you provided is still using the check_nt script so if I'm seeing 0 on those values your script wouldn't change that issue.

I've also tried uninstalling and re-installling NSCLIENT to see if that helped but why the heck would it be that easy?

Thank you again for all your feedback!
Last edited by ckrimmel on Tue Aug 12, 2008 1:58 pm, edited 1 time in total.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

ckrimmel wrote:I'll check it out, thank you Streaker. Anyone have any ideas on the other graphs I'm trying to pull? The SQL items is great but I would really like to get some of the other graphs working as well.

Thank you again.
The sunspots are affecting my psychic ability today. Any chance you could tell me what scripts you're attempting to use?
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
ckrimmel
Posts: 5
Joined: Wed Apr 23, 2008 3:17 pm

Post by ckrimmel »

I'm going to wipe out the Windows graphs and restart them to see if that helps at all...

I'm trying to use the scripts included on the attached post as well as the graph template that was provided. I'm trying to graph data for disk queue length (always shows as zero when its not), Memory Faults, a few of the ASP items, SQL Lockout Time, and wait time.
grady
Cacti User
Posts: 60
Joined: Wed Feb 20, 2008 5:02 pm

Post by grady »

Im having trouble getting these graphs to work. I moved the perl scripts to my <cacti>/scripts folder and have check_nt there as well. (which is where the perl scripts expect it to live)

Im trying to graph disk usage so I add a new host, then create graphs and check the "Create: Windows - Disk Usage" button, then give it a drive letter. (C,D, whatever)

Heres the graph debug:

Code: Select all

 
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="pexn001 - Disk Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="gigabytes" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/local/apache2/htdocs/cacti/rra/pexn001_disk_used_2073.rrd":disk_total:AVERAGE \
DEF:b="/usr/local/apache2/htdocs/cacti/rra/pexn001_disk_used_2073.rrd":disk_used:AVERAGE \
CDEF:cdefa=a,1073741824,* \
CDEF:cdefc=b,1073741824,* \
AREA:cdefa#002A97FF:"Total\:"  \
GPRINT:cdefa:LAST:"Size\:%8.2lf%s\n"  \
AREA:cdefc#F51D30FF:"Used\:"  \
GPRINT:cdefc:LAST:" Current\:%8.2lf%s"  \
GPRINT:cdefc:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:cdefc:MAX:"Maximum\:%8.2lf%s\n" 
RRDTool Says:

ERROR: opening '/usr/local/apache2/htdocs/cacti/rra/pexn001_disk_used_2073.rrd': No such file or directory

I have the permissions on the directory set appropriately (e.g cactiuser cactiuser)

Any suggestions?
chet
Posts: 41
Joined: Mon Feb 09, 2009 12:49 pm

Post by chet »

Alives wrote:Topic says NSClient...

http://nsclient.ready2run.nl/ <- nsclient official site

Its used for nagios to check windows servers from linux.

If you are running cacti on a windows host i would recommend you rewrite the scripts to use Win32::PerfMon module instead as it will be cleaner and more secure. Also you will have access to WMI.
I see that this scrips work with nsclient, will they also work with nsclient++ too?

Thanks
chet
Posts: 41
Joined: Mon Feb 09, 2009 12:49 pm

Post by chet »

what is up with this forum, 20 odd post by me with no replies, am I on some ignore list Mr Administrator?
chet
Posts: 41
Joined: Mon Feb 09, 2009 12:49 pm

Post by chet »

and still nothing!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests