CPU trends

Is it possible to get the exact trends of the CPU usage on a particular server. Something like a graph which tells how the CPU varied from time to time.

using nagiostat.

Problem is on unix machines there’s no easy way to read the CPU usage in % only the proces load is available in the SNMP tables. i’m graphing that through nagiostat and it just saved me lots of headaches yesterday when a samba-box went up in 10 range… :slight_smile:

Luca

Yes, I use nagiostat for many important functions. The rrd database for these is 5 yrs long so we can look back and say “4 yrs ago, the freespace in this oracle tabspace was 14G and suddenly, it jumped down to 1G”, why? a 5 yr rotating db is great and has actually help solve many many troubles. Cpu usage, disk space free, oracle tablespace free, even ping times/packet loss are now graphed here.

Jakkedup do you have a way to grab CPU usage in % or are you fetching the CPU Process load too?

Thanks, Luca

Solaris is load, sorry, but in general it works. It just kinda confuses people who don’t know what load averages are. When it is graphed, it makes much more sense, since they do see a pattern of highs and lows and sometimes big big spikes. So “load” is just fine. You will just have to get people use to seeing the numbers instead of %.

Will it graph for a windows 2003 server too. Is there any specific place where i can find steps on installing nagiostat. Thanks :slight_smile:

~/src/nagiosstat/README has a step by step install.
nagiostat will graph anything you give it. Remember, nagiostat is not installed on remote boxes, it’s installed on the central nagios server that is showing you “CPU usage 60% load or whatever”
Depending on how you setup the rrd database, is how the graphs will look. My graphs are 5 yrs long and show many different items.

Warning, rrd has a steep learning curve. So if you are unwilling to run
man rrdcreate
man rrdupdate
man rrdgraph
man rrdtool
then please stop now. You have to put your head into rrd and study the man pages, experiment with parsing and displaying your data the way you want it.


Thank you for your update Sir.
I guess the next few days i will be spending time reading the docs :slight_smile:

and when you have nagiostat running check nsclient for monitoring windows servers. I’m monitoring CPU usage on windows servers (here it comes as percents)
But as jakkedup said have one step at a time. :wink:

Luca

PS: Jakkedup: thanks for the explanation… :slight_smile:
Edited Mon Jul 25 2005, 11:44PM ]

Hi Jakkedup;
I was wondering how to go about migrating from nagistat in Nagios v1 to nagiostat in Nagios v2. We’ve upgraded out central and distributed servers to Nagios v2, and are having a devil of a time getting nagistat to work properly. As we could find no documentation on the the “integrated” nagiostat that installs w/ v2 (side from the ‘Using the Nagiostat Utility’ in the docs) we have reverted to using the executable and conf files from the old version (of nagiostat).
Have you or anyone else located any other documentation on how to migrate from one version to the next? Does the new nagiostats even have a configuration file? How to you set up the rrdtool paths and options in the new version?

Any point of clarification would be welcomed.
-Struwwelpeter

i’m using nagiostat with nagios 2… but the config file is always the same.

DIFFERENCE: you need to send different data to nagiostat when using nagios2. If i’m not mistaken there’0s been already a thread about this… anyway some function changed name in nagios

instead of using
/usr/local/nagios/nagiostat/nagiostat -p “$LASTCHECK$|!!
|$HOSTNAME$|!!|$SERVICEDESC$|!!|$SERVICESTATE$|!!|$OUTPUT$|!!|$PERFDATA$”

in your perfdata description you will need to use
LASTSERVICECHECK, SERVICEOUTPUT and SERVICEPERFDATA…

Luca

You could also use nagiosgraph. It’s pretty easy to set up but you obviously wouldn’t gain the in-depth knowledge into RRD straight away. (It’s based on Toby O’s fantastic system as well). I’ve attached a shot of one of my Win2k boxes CPU usage.

Must say that jakkedup’s graphs are way prettier than mine… :slight_smile:


Edited Wed Aug 03 2005, 05:56AM ]

[quote=“luca”]i’m using nagiostat with nagios 2… but the config file is always the same.

DIFFERENCE: you need to send different data to nagiostat when using nagios2. If i’m not mistaken there’0s been already a thread about this… anyway some function changed name in nagios

instead of using
/usr/local/nagios/nagiostat/nagiostat -p “$LASTCHECK$|!!
|$HOSTNAME$|!!|$SERVICEDESC$|!!|$SERVICESTATE$|!!|$OUTPUT$|!!|$PERFDATA$”

in your perfdata description you will need to use
LASTSERVICECHECK, SERVICEOUTPUT and SERVICEPERFDATA…

Luca
[/quote]

Thanks Luca, you really put me back on track.
I’ve cleaned up my /usr/local/nagios/etc/*.cfg files in addition to the
/usr/local/nagios/nagiostat/nagiostat script as well, including the changes you mentioned.
I was wondering if anyone remembers in which thread that original discussion took place, as I’ve searched on nagiostat and come up with only 5 postings.
Also, has anyone made a diff file of the changes in the MACROS between v1 and v2?
Lastly, you mentioned that the ‘new’ nagiostat uses the same ‘nagiostat.conf’ file as the old one. Where is it meant to live? (W/ the other *.cfg files?) And as the old ‘nagiostat’ was an editable script and the new ‘nagiostat’ is a binary, how are you meant to tweak it?

Thanks again for the advice!
-Struwwelpeter

nagiostat is still version 1.0 so i don’t know exactly what new version you are talking about, it’s nagios which changed…
nagiostat is a cgi file and a CONF file (mainly)
I’m not sure there is any need to modify anything in the nagiostat.conf file whil e igrating from nagios v1 to nagios v2… the data whoich gets passed should be the same only with differennt names (in nagios) so it should be transparent for Nagiostat…

Luca