UNIX Template Set for Cacti: HP-UX, Solaris, Linux

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

Moderators: Developers, Moderators

Post Reply
adumont
Posts: 16
Joined: Sat Nov 26, 2005 8:43 am
Location: Spain
Contact:

UNIX Template Set for Cacti: HP-UX, Solaris, Linux

Post by adumont »

Following my first cacti host template (v1.0), which allows to graph some usefull performance metrics of HP-UX boxes, I was missing an equivalent (and somehow homogeneous) host template for Solaris and Linux boxes.

So I’ve reworked and adapted some existing graphs and data templates, basing me on the one available for Net-SNMP compatible hosts, and also creating new ones.

Now my Unix Template Set for Cacti is composed of 2 host templates:
* my HP-UX host template (see changes below),
* a Net-SNMP compatible host template (working well for Solaris and Linux host for example).

Both templates gives the same graphs, using the same colors… They allow graphing of the following metrics:

* CPU Usage: Sys, Nice, User and Idle CPU time
* Jobs Average: 1, 5, and 15min Jobs Average
* Memory occupation,
* Detailled Memory: part of used memory dedicated to buffers, cached and shared (available for Linux only, as neither Solaris nor HP-UX report such detailled information),
* Swap occupation
* Running Processes
* Logged in Users
* Lan traffic: In/Out Traffic and In/Out Errors
* Filesystem occupation

I’ve also apported some minor changes to version 1.0 existing graphs templates:

* CPU graphs now give a total of 100%,
* HP-UX load average is correctly rendered (value divided by 100, as the snmp agent report it multiplied by 100).

Feel free to download version 1.1 of the Unix Template Set for Cacti, and use and/or redistribute it under the terms of the GPL license.

http://adumont.hopto.org/~adumont/blog/tag/cacti

UPDATED 11/01/2006:
check further on this page to get a newer version of the templates.
Attachments
cacti_templates-1.1.tar.gz
Version 1.1, includes HP-UX and Solaris-Linux (net-snmp) host template.
(37.92 KiB) Downloaded 20075 times
Last edited by adumont on Fri Feb 10, 2006 6:15 pm, edited 1 time in total.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

great I was searching that now.

I have a question (I am not very good in unix):
I receive data only from Load average, NOT from CPU, User, process memory nor swap ?

Do I have to change something in snmp.conf or something else in order to receive these data ?
I already put that in snmp.conf
disk / 50000
load 12 14 14
swap
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
adumont
Posts: 16
Joined: Sat Nov 26, 2005 8:43 am
Location: Spain
Contact:

Post by adumont »

Could you please give more information about the host's OS ? Is it an HP-UX, Linux or Solaris server?

What version of SNMPD are you running on the host?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

I have a question, why stacking the detailed memory averages but lines for the processes?

I prefer the lines - just not sure how to change it in the memory chart. Is it possible? How?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

pepj wrote:great I was searching that now.

I have a question (I am not very good in unix):
I receive data only from Load average, NOT from CPU, User, process memory nor swap ?

Do I have to change something in snmp.conf or something else in order to receive these data ?
I already put that in snmp.conf
disk / 50000
load 12 14 14
swap
The system I want to control for my test is a "Linux Suse 9.1" on a PC HP vectra L ... for test and to show cacti to my unix colleagues. Until now I was using Cacti only for routers and switches.
(läter redhat & solaris)

My cacti is Window 2003 as you can see in my signature.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
tobes
Posts: 8
Joined: Thu Jan 26, 2006 4:48 am

Post by tobes »

I take it this works only under *nix???

I have built a 2003 server cacti 0.8.6h and when I try the import I get :-

Warning: filesize(): Stat failed for C:\WINDOWS\TEMP\php2.tmp (errno=2 - No such file or directory) in C:\Inetpub\wwwroot\cacti\templates_import.php on line 59

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

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

I have processor and memory stats but I am after Solaris disk utilisation but unable to retrieve it.
adumont
Posts: 16
Joined: Sat Nov 26, 2005 8:43 am
Location: Spain
Contact:

Post by adumont »

Hi,

The host templates included in my tar.gz are the following:

. "* HP-UX Host", for HP-UX hosts,
. "* Solaris/Linux Host (ucd/net-snmp)" for any net-snmp compatible host (linux, solaris).

Any other Host template IS none of the one I ship.

Please, when you refer to a graph template, could you please specify the graph template name ?

(I mean that the "process" templates I've shipped are called: "HPUX 20 Processes" or "ucd 20 Processes" and both show stacked areas, not "line" graphs).

Why I choose stack instead of lines? Well I don't know. Feel free to change and or adapt the template as you like :-).

Some hints for those of you who are having troubles:
check if some of the graph of the template show data correctly.
If not, check if the corresponding SNMP agent is running in the host.
If yes, open the corresponding data template definition (name is hpux_* or ucd_*) and have a look at the OID box: something like .1.3.6.1.4.1.2021.4.5.0 e.g.
Try to do an snmpget or snmpwalk of that OID from the cacti box to the "failing" host.
If it fails, check you SNMP agent. If it gives you a good result, please inform here, because Cacti should also show it correctly.

Hope that this hits can help debugging :-)
many
Posts: 3
Joined: Tue Feb 07, 2006 12:07 pm
Location: London, UK

help with unix/solaris template

Post by many »

Hi There,

I am an experienced IT person, but I am new to Cacti and SNMP.

I have downloaded v1.1 of the template to monitor a number of solaris 9 servers. They are fairly new builds, both running net-snmp 5.1.1 downloaded from sunfreeware (as binaries). I am not running snmpdx or midiisa and I am runnung net-snmp straight out of the box with the minimum required snmpd.conf in /usr/local/share/snmp.

It looks like:

syslocation my place

syscontact someone@home

rocommunity public

As you can see it is very basic.

Now, Cacti 0.8.6h is running on a Linux workstation with the above template imported in.

I am getting error messages in the cacti log complaining that ssCpuRawIdle, ucd_memBuffer ucd_Cached and ucd_memShared was not available. When I run

snmpwalk -v1 -c public "host"

I don't get the above entries. What am I missing? Please.

Thanks you.
Yin Man
"change is the only constant"
many
Posts: 3
Joined: Tue Feb 07, 2006 12:07 pm
Location: London, UK

Post by many »

sorry adumont,

I should have read you comments. The ucd parameters I am having problems with are not supported. So I will disable them.

Yin
Yin Man
"change is the only constant"
onicrom
Posts: 3
Joined: Wed Jul 20, 2005 1:13 pm

import failed

Post by onicrom »

Hi Adumont,

First off, thanks for saving me lots of time :)

Just wondering if you ever had a problem importing the templates?

The hpux host went fine, but the hpuxfs, hpuxlan, and solarislinux host templates would not import.

I was able to manually do the hpuxfs/lan, but the solaris host template is a *little* bit more complicated.

Have you seen this before, or have any ideas on how I could debug the problem ?
adumont
Posts: 16
Joined: Sat Nov 26, 2005 8:43 am
Location: Spain
Contact:

Post by adumont »

Hi,

I don't remember having such problems with importing the templates.
The only problem I remember of, was that if you already have a version of the same template that you are importing, it seems that sometimes it won't import the changes very well, so i would recommend deleting the old version of the template before importing it updated version.

Just a comment: the files named cacti_host_template_*.xml are the only one that you need to import using the template Import feature.
Regarding the 2 other xml query files (hpux_fs.xml and hpux_lan.xml), you need to copy them into your <path_cacti>/resource/snmp_queries/ directory.
Another thing: for Solaris host template you won't need to install any query xml file, because it uses some of the default query files provided by cacti distribution (SNMP - Interface Statistics, SNMP - Get Mounted Partitions...). If you miss them when importing the template, you'll need to download again the cacti original files (please note I use cacti Version 0.8.6g, and that my templates may not work with newer version of cacti... any feedback regarding this question are welcome :-) ).

I'll post a new version (1.2), almost right now, so hopefully it'll help solve your import problem. Check here, or right at http://adumont.hopto.org/~adumont/blog/.

Alex
adumont
Posts: 16
Joined: Sat Nov 26, 2005 8:43 am
Location: Spain
Contact:

Version 1.2

Post by adumont »

Here is a new version of my Cacti host templates for Unix systems — read HP-UX, Solaris and Linux machines and maybe other Net-SNMP compatible OS.

This new version introduces the following changes:

* I’ve splitted the “Solaris Linux ucd/net-snmp” template into two separated flavours. That way I’ll be able to tweak the graph templates of each OS according to its own particularities;
* one example of this is the CPU graph template: while in the Linux template it show nice, sys and user %CPU, in the Solaris version it now shows: kernel, wait (instead of system) and user CPU. I’ve also removed nice CPU as it won’t graph on a Solaris box.
* I’ve removed the Detailled memory graph from the Solaris template, as Solaris doesn’t seem to report such detailled metrics . It’ll only be in the Linux flavour.

Feel free to download version 1.2 of the Unix Template Set for Cacti, and use and/or redistribute it under the terms of the GPL license.

You may also check this link and leave a comment there:
http://adumont.hopto.org/~adumont/blog/tag/cacti
Attachments
cacti_templates-1.2.tar.gz
Alex's Unix Host Template set for Cacti, version 1.2, GPL license.
(57.99 KiB) Downloaded 9740 times
onicrom
Posts: 3
Joined: Wed Jul 20, 2005 1:13 pm

Post by onicrom »

Hi Adumont,

I just installed 0.8.6g to test with v1.2 of your templates. I'm still not able to import the linux or solaris templates. When I click 'save' the page reloads and nothing happens. Could there be a setting I am missing in php.ini? or apache?

Any ideas would be much appreciated.

Thanks again,
Kyle
onicrom
Posts: 3
Joined: Wed Jul 20, 2005 1:13 pm

Post by onicrom »

Success!

php.ini was set to a 'memory_limit' of 8Mbytes, I changed this to 32Mbytes, and the imports were successful.

--kyleo
adumont
Posts: 16
Joined: Sat Nov 26, 2005 8:43 am
Location: Spain
Contact:

Post by adumont »

Thanks for your feedback :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest