Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jul 17, 2019 5:31 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Graphing Windows NT hosts via SNMP
PostPosted: Thu Jul 21, 2005 2:38 pm 
Offline
Cacti User

Joined: Mon Jul 04, 2005 10:12 am
Posts: 63
Location: Brazil
May/3/2006 - UPDATE - Template updated for 0.8.6h. The same instructions as in my original post still apply, but now the upper limit in disk graphs should be expressed in megabytes, not in bytes.
The file is attached to the topic. Regards,

Georger

---

Hi,
I have some Windows NT boxes at work and wanted to graph them, but Cacti 0.8.6f doesn't have a Windows NT template, and the 2000/XP template isn't compatible, as you can see in my topic http://forums.cacti.net/viewtopic.php?t=8548. So I asked around, did a lot of research and came up with my own Windows NT host template.

Cookbook:
1) Install the Microsoft SNMP Service on your Windows NT box. You'll need to reinstall SP6a in order for the agent to actually run. Download SNMP4NT from http://www.wtcs.org/snmp4tpc/nt.htm and install it. Run mibinst.bat afterwards.
2) Copy winnt_disk.xml and winnt_cpu.xml to your <path_cacti>/resource/snmp_queries/ directory.
3) Import the cacti_host_template_windows_nt_host.xml template file. Done!

Pay attention that you have to manually add the upper limit (insert hard drive size in bytes) to your Disk graphs, as well as upper limit (Commit Limit in bytes) and Physical Memory (physical memory in bytes) to your Memory graphs. This is due to limitations in the Windows NT SNMP agent.
To be honest, the graphs are pretty ugly, but they're WAY better than no graph at all. I tested this successfully on two servers. Have fun!

Georger


Attachments:
File comment: Windows NT host template and associated SNMP queries.
winnt.zip [14.92 KiB]
Downloaded 3732 times


Last edited by georger_br on Wed May 03, 2006 11:25 am, edited 3 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 5:52 pm 
Offline
Cacti User

Joined: Mon Mar 28, 2005 4:31 pm
Posts: 93
Location: Boston, MA
Works well thanks.

Have you considered using Host-Resources-V1 for the disk stats? I am using H-R-V2 for 2000/2003/XP machines seems to work well.

_________________
- Aaron Jeskey


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2005 11:46 am 
Offline
Cacti User

Joined: Mon Jul 04, 2005 10:12 am
Posts: 63
Location: Brazil
Glad you like it. Seeing that my template was downloaded 58 times as of today is rewarding, but getting some real feedback is much better :)
You said right - it works fine for 2K/2K3/XP boxes because their native SNMP agent SUPPORTS the HRV1/HRV2 MIB. NT's native SNMP agent (9 years old now, see? :D) does not - and SNMP Informat does a great job filling that void. Regards,

Georger

ajeskey wrote:
Works well thanks.

Have you considered using Host-Resources-V1 for the disk stats? I am using H-R-V2 for 2000/2003/XP machines seems to work well.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2005 7:19 pm 
Offline

Joined: Thu Nov 03, 2005 2:34 pm
Posts: 6
Location: Netherlands
Thanks for this script. Perhaps this solves my problem (i'm getting the 2003-boxes not working with the 2k/xp script ;))


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 8:52 am 
Offline
Cacti User

Joined: Mon Jul 04, 2005 10:12 am
Posts: 63
Location: Brazil
Anyone interested in seeing this template converted to 0.8.6g? I'll only bother to do it if somebody says they want it, because it's a fair bit of work to spend on an old platform - and the template works flawlessly in 0.8.6f. Regards,

Georger


Top
 Profile  
 
 Post subject: Can't get this to work
PostPosted: Fri Apr 07, 2006 7:07 pm 
Offline

Joined: Tue Apr 19, 2005 5:24 pm
Posts: 22
First off, thanks for the template!
I am using cactif, I can get the memory. But no graph for disk space. So I ran the verbose query and get this:

+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'E:\Apache2\htdocs\cacti/resource/snmp_queries/winnt_disk.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.311.1.1.3.1.1.5.1.1'
+ Located input field 'informDiskInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.311.1.1.3.1.1.5.1.1'
+ Found item [informDiskInstance='0:0:C:'] index: 6.48.58.48.58.67.58 [from value]
+ Found item [informDiskInstance='_Total:_Total'] index: 13.95.84.111.116.97.108.58.95.84.111.116.97.108 [from value]
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/snmp_queries/winnt_disk.xml'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/snmp_queries/winnt_disk.xml'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/snmp_queries/winnt_disk.xml'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/snmp_queries/winnt_disk.xml'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/snmp_queries/winnt_disk.xml'

Sometime when I use get if to get the snmp information, I get wrong type(should be integer) for indexes.

What could be the problem?

Thanks,
Luckyksc


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 3:26 am 
Offline
Cacti User
User avatar

Joined: Thu Sep 29, 2005 5:21 am
Posts: 102
Location: Edinburgh, Scotland
Am trying to import the new template (updated May 3rd), and am getting the following error:

Quote:
Warning: filesize() [function.filesize]: stat failed for C:\WINDOWS\TEMP\php24F7.tmp in E:\Inetpub\wwwroot\cacti\templates_import.php on line 59

Warning: fread() [function.fread]: Length parameter must be greater than 0 in E:\Inetpub\wwwroot\cacti\templates_import.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at E:\Inetpub\wwwroot\cacti\templates_import.php:59) in E:\Inetpub\wwwroot\cacti\templates_import.php on line 71


Any ideas?

_________________
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime]


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 10:11 am 
Offline
Cacti User

Joined: Mon Jul 04, 2005 10:12 am
Posts: 63
Location: Brazil
Hmm,
I just did a fresh install of Cacti on my dev machine, and it imported the template fine.
Is the TMP file OK? Does your webserver have permission to write to C:\WINDOWS\TEMP? Can you upload anything else with PHP?
My current environment is: Windows XP SP2, Apache 1.3.34, MySQL 5.0.20a, PHP 4.4.1, Cacti 0.8.6h + patches. Regards,

Georger


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 05, 2006 5:36 am 
Offline
Cacti User
User avatar

Joined: Thu Sep 29, 2005 5:21 am
Posts: 102
Location: Edinburgh, Scotland
http://forums.cacti.net/viewtopic.php?t=12942

Sorted - was permissions errors on the TEMP folder for the IUSR user-id...

_________________
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime]


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 05, 2006 8:03 am 
Offline
Cacti User

Joined: Mon Jul 04, 2005 10:12 am
Posts: 63
Location: Brazil
Did the new template work? Regards,

Georger


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 05, 2006 8:10 am 
Offline
Cacti User
User avatar

Joined: Thu Sep 29, 2005 5:21 am
Posts: 102
Location: Edinburgh, Scotland
Is Use (RAM+Swap) is showing correct figure.
Total (RAM+Swap) is still incorrect. still looks like its 2^32 then resetting to 0 so only shows 114 MB. (see graph)

Although for some (other) reason, the disk stats now seem to be broken...will check these out...


Attachments:
awdlive3.jpg
awdlive3.jpg [ 31.9 KiB | Viewed 35515 times ]

_________________
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime]
Top
 Profile  
 
 Post subject:
PostPosted: Fri May 05, 2006 8:49 am 
Offline
Cacti User

Joined: Mon Jul 04, 2005 10:12 am
Posts: 63
Location: Brazil
You have to change the graph upper limit for disk graphs - the template now takes disk space in megabytes, not bytes.
About the memory problem, try the following:

Click Data Templates
Edit "Windows NT - SNMP - SNMP4NT - Memory Allocatable"
Change "Maximum Value" to 0. It's 16 GB right now, but who knows if it has a hard-coded 2^32 ceiling. Regards,

Georger


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 21, 2006 3:43 pm 
Offline
Cacti User
User avatar

Joined: Tue Jul 12, 2005 8:16 pm
Posts: 250
hello, can you help me ?


Attachments:
error.JPG
error.JPG [ 32.6 KiB | Viewed 33937 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 21, 2006 5:11 pm 
Offline
Cacti User
User avatar

Joined: Tue Jul 12, 2005 8:16 pm
Posts: 250
solved
it was the graph template
i have delete it and recreated


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group