Win32 - Monitor running processes

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

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#46 Post by BSOD2600 » Sat Apr 23, 2005 3:16 pm

1) Seems the older versions of net-snmp don't output the units (like 5.1.1).
2) Modify win32_procs.xml with the following and let me know if the units are removed. I tried it against my windows box, and everything seems to still be working (same values as before).

Code: Select all

      <hrSWRunPerfMem>
         <name>Memory</name>
         <method>walk</method>
         <source>VALUE/REGEXP:\d+</source>
         <direction>output</direction>
         <oid>.1.3.6.1.2.1.25.5.1.1.2</oid>
      </hrSWRunPerfMem>

nethedy
Posts: 18
Joined: Tue Feb 08, 2005 9:32 am

#47 Post by nethedy » Sun Apr 24, 2005 5:15 am

[quote="BSOD2600"]nethedy: What don't you understand? When you add the data query, you need to change the reindexing method to Index Count Changed. Otherwise, when you restart a process, it's PID will change and then the OID will not be valid.
quote]

BSOD2600:
what you said,"the reindexing method" mean?change where for?

nethedy
Posts: 18
Joined: Tue Feb 08, 2005 9:32 am

please have a look

#48 Post by nethedy » Sun Apr 24, 2005 5:37 am

i understand what your said,but when i select a process to graph,it apear the message ,
Attachments
&#25429;&#33719;_3.jpg
&#25429;&#33719;_3.jpg (86.77 KiB) Viewed 11900 times
&#25429;&#33719;_3.jpg
&#25429;&#33719;_3.jpg (86.77 KiB) Viewed 11901 times
&#25429;&#33719;_2.jpg
&#25429;&#33719;_2.jpg (83.22 KiB) Viewed 11902 times

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#49 Post by BSOD2600 » Sun Apr 24, 2005 12:55 pm

nethedy: Did you change the data source Index Type to hrSWRunName and enter in the process name?

If so, then you have something misconfigured with net-snmp and the MIBs. Looks like you can't even properly get interface stats either, so there is something else you need to fix before trying to get scripts working. Does manally running snmpget against one of the OIDs for a process work?

jvlalonde
Posts: 14
Joined: Mon Mar 21, 2005 10:01 am

Kbytes in snmpwalk result

#50 Post by jvlalonde » Mon Apr 25, 2005 3:46 am

Hi,

the workaround doesn't seem to work here:

04/25/2005 10:40:23 AM - CMDPHP: Poller[0] Host[13] WARNING: Result from SNMP not valid. Partial Result: 4904 KBytes

I'm running snmpwalk (5.1.2) from a Fedora Core 3 Linux Machine and polling a Windows 2000 Server machine.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#51 Post by BSOD2600 » Mon Apr 25, 2005 12:31 pm

Hmm, guess I might have to install linux and get cacti set up to try and fix this. What a pain in the ass!

Anyone can feel free to play around with the proper regex to spit out the right number (although, I'm not sure why \d+ didn't work since that should only spit out repeating numbers).

elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

#52 Post by elnino » Mon Apr 25, 2005 1:08 pm

Still getting the same error too, just like jvlalonde. I'm running a Sentinix linux box polling a Windows 2k server.

BSOD2600, if you're looking for a quick 10min linux install, try Sentinix. It comes pre-installed with Cacti (older), PHP 4.3.4 and net-snmp 5.0.9. So, you'd have to upgrade Cacti to 0.8.6c and possibly PHP and you're ready to go.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#53 Post by BSOD2600 » Mon Apr 25, 2005 6:02 pm

New fix to try...

Code: Select all

      <hrSWRunPerfMem>
         <name>Memory</name>
         <method>walk</method>
         <source>VALUE/REGEXP:([0-9]).*$</source>
         <direction>output</direction>
         <oid>.1.3.6.1.2.1.25.5.1.1.2</oid>
      </hrSWRunPerfMem> 

nethedy
Posts: 18
Joined: Tue Feb 08, 2005 9:32 am

please have a look

#54 Post by nethedy » Mon Apr 25, 2005 10:12 pm

there are two pictures for my system graph
Attachments
&#25429;&#33719;_4.jpg
&#25429;&#33719;_4.jpg (106.88 KiB) Viewed 11846 times
&#25429;&#33719;_5.jpg
new error
&#25429;&#33719;_5.jpg (58.54 KiB) Viewed 11847 times

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#55 Post by BSOD2600 » Mon Apr 25, 2005 11:53 pm

Was there a question?

jvlalonde
Posts: 14
Joined: Mon Mar 21, 2005 10:01 am

Kbytes in snmpwalk result

#56 Post by jvlalonde » Tue Apr 26, 2005 5:35 am

Hi,

I've just played with the REGEXP in win32_procs.xml and it seems that it's simply ignored.

I've tried diff. possibilities but I always got the same result:

Code: Select all

04/26/2005 12:26:48 PM - CMDPHP: Poller[0] Host[13] WARNING: Result from SNMP not valid.  Partial Result: 4772 KBytes
In my opinion there should be a bug with the "VALUE/REGEXP" Option, cause I also tried to filter the exact expected result

Code: Select all

.*(1552).*$
but sill got KBytes after the integer.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#57 Post by BSOD2600 » Wed Apr 27, 2005 6:25 pm

Linux users: Apply the patch found here (scroll down to the bottom). This should eliminate the pesky kbyte from appearing.

Turns out, Cacti currently does not allow regex's for output. Only input.

jvlalonde
Posts: 14
Joined: Mon Mar 21, 2005 10:01 am

REGEXP

#58 Post by jvlalonde » Thu Apr 28, 2005 3:08 am

It works!!!
The functions.php patched version works!

Thanks for the tip.

proxyo
Posts: 11
Joined: Wed Apr 20, 2005 9:07 am
Location: France

#59 Post by proxyo » Mon May 23, 2005 4:19 am

Hi!

If you look on nethedy graph you would that he doesn't have any memory usage graph in his graph.
I have the same problem, i've already test this great add on without any problem... I don't understand what happened....

Anybody have a solution or a council?! :-?
I'm under win xp pro sp2
Thanx a lot...

ProxyO

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#60 Post by BSOD2600 » Mon May 23, 2005 1:17 pm

Use GetIF and look at the OID tree for the device. Is the memory information present? I'm betting it's not.

Post Reply