plethora of windows nsclient scripts

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

Moderators: Developers, Moderators

jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Do these scripts call for perfmon? How do they get the data once connected via the nsclient?

Thanks.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Did anyone rewrite these scripts to monitor from a Windows server via WMI?

Please help? I would really like to gather some of these values.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Jengstro these scripts/templates call a process called check_nt to gather the data FROM the machines with nsclient on them...

Unfortunately there does not seem to be any one place that ALL the different scripts look for check_nt...

e.g. one of them looks for check_nt in the cacti scripts directory, another looks for it in the nagios directory. OH and the cacti scripts directory was different from MY cacti Scripts directory.

It would be nice if those posting scripts/templates that use external plugins (e.g. Check_nt) specified UP FRONT where they are expecting the plugins to be, rather than expecting you to edit the scripts yourself.

Instead of editting the scripts I now have several instances of Check_nt on my CactiEZ machine...

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Alives
Cacti User
Posts: 103
Joined: Mon Jul 11, 2005 11:39 am

Post by Alives »

sorry about that...why dont you make the changes and re-submit for the community here?
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

<erm> I intend to develop some more templates which I find useful (getting ready for Virtualisation need to gather loads of Perfmon data over time!),,,

Once I'm happy with my ones I'll post them here... Although most of them are going to use the perfmon data query so no need to rewrite the scripts.

Good work BTW!

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Alives
Cacti User
Posts: 103
Joined: Mon Jul 11, 2005 11:39 am

Post by Alives »

thanks... yeah i have quit using all the others and use perfmon solely... looking forward to seeing your scripts!
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Alives....

I've just thought of something, and wondered if you could add your input???

Classic Cacti Graphs (e.g. Bandwidth Utilisation) measure the average activity over 5 minute intervals, THUS:

Start: Get Total No. of bits sent inbound/outbound throught this interface (provides Variables iA and oA)
5 minutes later: Repeat (provides Variables iB and oB)

Calculate: iB-iA = iC & oB - oA = oC

Calcualte: iC/600 and oC/600 gives Average Bandwidth Utilisation per second over the 5 minute period in and out bound.

Now perfmon stats are point in time stats [right?].

So most of them won't provide the same sort of graphing as Cacti is designed for.... (e.g. if you grab the perfmon stat CPU utilisation that is the CPU utilisation at that point in time and ignores any peaks between two periods, so that if you take a measure at 12:00 (lets say 5%), at 12:01 there starts a 3 minute spike of CPU utilisation (say 95%) then you take another measure at 12:05 when the utilisation has returned to 5% you will COMPLETELY miss the spike!)

Now there may, or may not be a way around this for CPU, perfmon MAY already provide this stat (dunno, can't see it) , OR the host_mib cpu utilisation MAY have already taken this into account (again dunno, I'm trying to find out).

Some perfmon stats lend themselves to being graphed in this point of time way very nicely, and it doesn't really matter about the 5 minute peak thing (e.g. System Up time, no of processes running, logged in users,etc..).

BUT if you want to measure something like Messages Delivered per minute on an exchange box then you can run into problems... (e.g. it grabs the current value of messages delivered per min, and ignores values in between).

I CAN see a way around this, as perfmon provides stats like TOTAL Messages delivered/sent (similar to the way Bandwidth Stat data is provided in its raw form) and there would therefore be a method to gather the data in this "more cacti" way.... Unfortunately I don't know where to start on this one...

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
drwatson
Posts: 1
Joined: Thu Feb 23, 2006 8:54 am
Location: Vienna, Austria

Post by drwatson »

I have installed NSClient on my Windows box. It contains two physical disks. I can query every parameter with the _Total argument. But when I want to query values for a specific disk I always get 0. I already tried only with the index number, or index number + drive letter,...
Does anyone know about this problem?
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Hmmm... I noticed that the "Windows - Disk Usage" graph asks for a disk letter. If you give it c: of d: or c:\ or d:\ it doesn't work - just give it C or D, then it works!

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

OK, there is a problem with the nt_perfmon.pl script under Cacti .8.6h with cactid .8.6g at least.

If you run the script from a command line it works fine, if you let Cacti do it it comes up with a "partial result" result in the log - it does seem to feed stuff to graphs though (although I have yet to confirm this).

I did notice that if you hard code the variables into a script then it works fine...

I think this is why my poller is taking so long to complete (in excess of 170 seconds for 34 hosts - most of which are using the nt_perfmon script several times)...

I've tried to trouble shoot the script, but whatever I do either breaks it or makes no difference...

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Did anyone ever re-write these scripts so they work on a Windows platform ? Perfmon data would be good to have graphed...

Thanks
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

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...
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Swad
Posts: 7
Joined: Fri Oct 15, 2004 10:39 am

Post by Swad »

In light of what argon0 said above, I'm curious if there is a meaningful way to graph such things as CPU utilization or other such things that a single point in time measurement against performance monitor has no real meaningful information (such as the example given of a big CPU spike not necessarily being measured).

Is there a meaningful way to measure such things as this--whether with these nsclient scripts or some other way?
UKS-Gavin
Posts: 42
Joined: Fri Oct 06, 2006 7:36 am

Post by UKS-Gavin »

Good set of plugins. You may want to include a README with them though.

Thanks,
Gavin
X505
Posts: 39
Joined: Fri Jun 29, 2007 3:53 pm
Contact:

Post by X505 »

really cool plugin set ! it really help me (new in cacti)

just want to tell that i needed to change the "Maximum Value" in the data template of disk usage and memory usage. 1000 is to small for more than 1To of disk and 10Go of RAM ;)

thank you very much !
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests