[rrd-users] Monitoring Citrix Servers - WMI/VBscript

Simon Hobson linux at thehobsons.co.uk
Sat Jan 5 09:31:08 CET 2008


jasonoz wrote:

>I want to keep a history of the sessions during a
>24hr period and also over 1 month. Any help would be appreciated.
>
>Create the DB
>---
>strReturn = oShell.Run ("rrdtool create .\data\" & strComputer &
>"-citrix.rrd --step 300 DS:active:GAUGE:600:U:U DS:disc:GAUGE:600:U:U
>RRA:AVERAGE:0.5:12:24 RRA:AVERAGE:0.5:288:31")
>
>Update the DB - script runs every 5 mins
><snip>
>Create the Graphs - script runs every 5 mins


I can't help with your script, but  minor detail is that you are 
storing data only for hourly intervals - so a one day graph is going 
to be very coarse. It also won't change from one hour to the next, so 
drawing it every five minutes is a waste of time.

I also don't see start/end times (or end/period) in the graph 
definition. Be aware that should you ask for a period which goes just 
one second past the one day you are storing at 'hi res' then you will 
get the monthly data graphed - ie one flat line for the whole day !

It comes up regularly on here. It is strongly advised to be specific 
about the end time, as derived by this pseudocode :

now = date <get date in seconds since epoch>
interval = 3600 <set the interval to that used for the samples stored>
period = 86400 <similarly, set the graph period>

end = now - (now mod interval) <round it to the sample interval

blah blah <stuff to draw graph> --end=end --start=end-period blah blah


But since it would be possible for that hourly period to 'click over' 
while the script is running, I would advise storing 25 hours (at 
least) and 32 days (at least).



More information about the rrd-users mailing list