Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Windows performance counters & VBS/WMI via SNMP
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Windows Specific
Author Message
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Sat Feb 02, 2008 12:25 pm    Post subject: Windows performance counters & VBS/WMI via SNMP Reply with quote

Hello there,

I have been using cacti in production environement for a while and the tool is great and has been very helpful in many situations.

Still, MS Windows does not always provide the right OID's, and particularly when it comes to retrieve performance counters.

This is why I have developped a snmp agent that is simply an interface between SNMP and the windows perf counters.

This way, any existing perf counters on my windows boxes can be retrieved via snmp and used from cacti running on my linux box.
The agent can also debug incoming snmp requests to a log file.

So the tool is there with a quick how to : http://erwan.l.free.fr/snmptools .
The tool is a freeware, provided as is, and is meant to eventually help sysadmins monitoring windows boxes.

Any feedback welcome.

Regards,
Erwan.

Added :
One can specify his own oid's pointing to defined MS performance counters in an ini file (thus making it easier to deploy to one host to another).
An oid can now also point to an external executable (like a vbs / wmi script).

SnmpTools now support 32 and 64 bits platforms.


Last edited by erwan.l on Sat Aug 30, 2008 1:57 pm; edited 4 times in total
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6791
Location: WA, USA

PostPosted: Sat Feb 02, 2008 2:25 pm    Post subject: Reply with quote

hmm, very interesting. I'll have to give it a try this weekend.
Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Wed Feb 06, 2008 7:00 pm    Post subject: Reply with quote

Fantastic tool and page/write up. Thanks!
Back to top
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Thu Feb 07, 2008 5:05 am    Post subject: Reply with quote

Hi,
Thanks for the feedback.

I am currently using this snmp agent to monitor the average disk queue length on a server where we suspect IO issues.

Here attached an example.

Regards,
Erwan.



avg_disk_queue.jpg
 Description:
 Filesize:  30.49 KB
 Viewed:  8988 Time(s)

avg_disk_queue.jpg


Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Thu Feb 07, 2008 5:10 pm    Post subject: Reply with quote

Hey Erwan,

Feature request already =) Can this work with x64 versions of 2003?
Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Thu Feb 07, 2008 6:51 pm    Post subject: Reply with quote

Erwan,

Maybe I spoke a bit too soon. I have this setup on a test box, dumped the .zip file contents into the system32 folder and then ran the registry edit successfully. I can browse all the normal SNMP OID's on windows, but get

enterprises.15 = No Such Object available on this agent at this OID

When checking 15
Back to top
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Fri Feb 08, 2008 9:12 am    Post subject: Reply with quote

Hi,
The oid is 1.3.6.1.4.1.15.
snmp get this oid and you should get snmptools.

merge the reg file :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents]
"snmptools"="SOFTWARE\\snmptools\\CurrentVersion"

[HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion]
"Pathname"="%systemroot%\\system32\\snmptools.dll"

Add debug="1" (string) under [HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion] to debug to c:\log.txt.

Restart the snmp agent.

Let me know what you get in your log.txt so that I may be able to help you.

Regards,
Erwan.
Back to top
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Fri Feb 08, 2008 9:13 am    Post subject: Reply with quote

Hi Malken00,
I will check this week end if I can run a windows64 bits in a VM and then should be able to compile a specific version of snmptools.

Regards,
Erwan.
Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Fri Feb 08, 2008 11:31 am    Post subject: Reply with quote

Hey Erwan,

Thanks for the quick support on it!

Here is the log.txt:

08:29:44:415,start
08:29:46:415,Error 170 : The requested resource is in use.
:Unable read MULTI_SZ value
08:29:46:415,PerformanceData1.ObjectCount <=0
08:29:46:415,DLL_PROCESS_DETACH
08:29:46:415,clean
Back to top
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Fri Feb 08, 2008 1:01 pm    Post subject: Reply with quote

Uhm indeed, this is wierd.

The good news is that the agent is installed sucessfully and starts along with the snmp daemon.

The bad news is that it cannot retrieve the local perf counters and therefore terminates right away.

What kind of windows server is this?
I have tested snmptools ok with w2k and w2k3, standard and enterprise edition, 32 bits.

Regards,
Erwan.

PS :
to test perf counters, you can use iptools to list these.
download here : http://Erwan.l.free.fr/sniffer.zip, and goto tools\ms networks\perf counters and get a screen like the one below.

if you get a similar list as below, at least I know that the perf counters part is fine and I have to look on the snmp agent part.

if it is a perf issue, see MS KB there : http://support.microsoft.com/kb/300956/en-us (lodctr /R to rebuild counters list).



perf.jpg
 Description:
 Filesize:  61.56 KB
 Viewed:  8916 Time(s)

perf.jpg


Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Fri Feb 08, 2008 1:59 pm    Post subject: Reply with quote

Erwan,

These are W2k3 boxes, SP2 on both.
Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Fri Feb 08, 2008 2:16 pm    Post subject: Reply with quote

I am able to use iptools, and bring up the counters without an issue, they show all of the local counters for all services.
Back to top
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Fri Feb 08, 2008 2:22 pm    Post subject: Reply with quote

Oki very good.
So i will focus on the agent part.
Sounds easy but does restarting the service help?

Regards,
Erwan.
Back to top
erwan.l
Cacti User


Joined: 22 Jan 2008
Posts: 72

PostPosted: Fri Feb 08, 2008 3:35 pm    Post subject: Reply with quote

working on the issue mentionned below.

regarding 64bits system, I dont know much yet but would putting the dll in SysWOW64 instead of system32 help?
I read here and there that 32bits dll's should not go in the system32 on 64 bits systems but in the syswow64.

/erwan
Back to top
malken00



Joined: 17 Jan 2007
Posts: 34

PostPosted: Tue Feb 12, 2008 10:43 am    Post subject: Reply with quote

Putting it in syswow allows me to register it, but doesn't appear to work/load the tool
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Windows Specific All times are GMT - 5 Hours
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

 



Powered by phpBB © 2001, 2005 phpBB Group