TS - Trying to combine graph and information on same ICON

Wim Nelis wim.nelis at inter.nl.net
Tue Jun 15 08:24:15 CEST 2010


> I have been trying to update data information and also create a graph under the same ICON.
> I have changed the colons ‘:’ to html colons also and even that does not do it.  : = : per an earlier email.
>
> I have to split them into an icon called ‘logins’ for graphing and an icon called ‘who’ for the ‘who –u’ output.
> If I try to do them both to the same ICON, the graphing stops but the data continues to be updated and displayed.
>   
Did you look for any logging about this problem? I expect messages to be 
logged in rrd-status.log.

> I currently have 3 logins going on the server:
>                 [cid:image002.jpg at 01CB0BCC.0B826540]
> Here are the logins:
>                 [cid:image004.jpg at 01CB0BCC.0B826540]
>
> What I want to do is get both under the same ICON name.  Do I need to do something like ‘data’ instead of ‘status’ on the ‘bb’ line?
>   
No, you may combine them in one status message. As an example the status 
message of test (ICON) termusers (a modified version of the termuser.pl 
script from xymonton):

<PRE>
2010.06.15 08:11:50
There are 3 terminal users on sodn016w
<!--
TotalSession : 3
ActiveSession : 2
-->

USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
pcadmin               console             0  Active          .  2010.06.14 9:24
duque                                     1  Disc        none   2010.06.15 7:11
masel                 rdp-tcp#1355        2  Active         29  2010.06.15 7:34

</PRE>


> Here is the simple script using ‘who –u’ as the data source:
> # cat logins.sh
> #!/bin/sh
> #ident "@(#)logins.sh Ver. 1.0 Tom Schmitt  2010"
> #-------------------------------------------------------------------------------
> # Under GPL 2010 by Tom Schmitt   dtschmitt at gmail.com  801.446.5645
> #-------------------------------------------------------
> # From the HELP --> Custom Graphs in Xymon
> # Installed by Tom Schmitt for test purposes
> #-------------------------------------------------------
> # Creates a graph of the number of logins under:  logins
> # Lists those logged in under:  who
> #-------------------------------------------------------
> .... lines deleted ....
> BB=/home/xymon/server/bin/bb    # Location of 'bb'
> BBDISP=127.0.0.1                # Local display
> MACHINE="monitorp.csw.l-3com.com"
>
> LOGINS=`who -u | wc -l | awk '{print $1}'`
>
> #-----------------------------------------------------
> # Send the value pair for graphing under icon 'logins'
> #-----------------------------------------------------
> $BB $BBDISP "status $MACHINE.logins green
>
> logins : $LOGINS
> "
>
> # Get the 'who -u' info and change all colons to:
> #       : for an html colon
> # Edit the colons ':' to be html colons ':'
> # You don't want the data to look like value pairs:
> #     (name : value) or (name = value) to Xymon
> who -u >/tmp/logins.tom
> sed -i 's/:/\&\#58\;/' /tmp/logins.tom
>   
Perhaps all colons an a line need to be hidden from the NCV module.

HTH,
  Wim Nelis.



More information about the Xymon mailing list