Trying to create a graph
list Tom Schmitt
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called: SNMP-Juniper.sh
Per the Xymon Help à custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD /home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE $BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600 users\n
GPRINT:in:LAST:Cur\: %6.2lf %s
GPRINT:in:MAX: Max\: %6.2lf %s
GPRINT:in:MIN: Min\: %6.1lf %s
GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online" This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tim McCloskey
Not sure if this will help or just mis-guide you so take with a grain of salt.
Your config looks very similar to one of the graphs I recently added for a NetApp box. One thing that I did differently is in the use of the names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
▸
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper SSLVPN device(s).
I created a new ICON ‘online’ where there is a lot of information passed for display by clicking the ‘online’ icon.
This is done using ‘bb’ with ‘status’.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value from each run to the Xymon as ‘data’ to ‘bb’.
The pair from each run is: USERS:277 with the 277 changing with every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called: SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD /home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE $BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600 users\n
GPRINT:in:LAST:Cur\: %6.2lf %s
GPRINT:in:MAX: Max\: %6.2lf %s
GPRINT:in:MIN: Min\: %6.1lf %s
GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=”…..,online=ncv”
At the end of the GRAPHS=”…..,online” This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online=”USERS:GAUGE”
I only see a small graph box with “X hobbitgraph ncv:online” in the box under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tom Schmitt
Tim, Pardon me for asking, but I am trying to compare and isolate my problem. What is the name and location of the script your are running? Usually in server/ext directory. What is the name of the ICON to place the graph under? What does the 'bb' command that sends the data look like? And, what does the data pair(s) look like? E.g. "USERS:228" or "USERS : 229", etc. What did you add to hobbitlaunch.cfg?
▸
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tim McCloskey
Tom,
For this test the hobbitserver is the client, so client/ext/somescript.sh is where the script is at. Sorry I completely missed that when looking at what you wrote!
So from client/etc/clientlaunch.cfg:
[NA2CPU]
ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
CMD $HOBBITCLIENTHOME/ext/na2.sh
LOGFILE $HOBBITCLIENTHOME/logs/na2.log
INTERVAL 2m
Script outputs same data format as yours
...
NA2CPU="`$EGREP Busy $datafile | $AWK '{print $2}'`"
if [ $NA2CPU -gt 78 ]
then
COLOR=red
MSG="na2 CPU load is high"
fi
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
NA2CPU : ${NA2CPU}
"
...
From the main server/etc/hobbitlauch.cfg you should already have:
[hobbitclient]
ENVFILE $somepath/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD $somepath/client/bin/hobbitclient.sh
LOGFILE $BBSERVERLOGS/hobbitclient.log
INTERVAL 5m
▸
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Pardon me for asking, but I am trying to compare and isolate my
problem.
What is the name and location of the script your are running?
Usually in server/ext directory.
What is the name of the ICON to place the graph under?
What does the 'bb' command that sends the data look like?
And, what does the data pair(s) look like? E.g. "USERS:228" or
"USERS : 229", etc.
What did you add to hobbitlaunch.cfg?
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tim McCloskey
Also, the test is listed under the hobbitserver-as-a-client display as NA2CPU. Sorry for these mistakes/ommisions :)
▸
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Pardon me for asking, but I am trying to compare and isolate my
problem.
What is the name and location of the script your are running?
Usually in server/ext directory.
What is the name of the ICON to place the graph under?
What does the 'bb' command that sends the data look like?
And, what does the data pair(s) look like? E.g. "USERS:228" or
"USERS : 229", etc.
What did you add to hobbitlaunch.cfg?
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tom Schmitt
Tim,
That worked for the example under HELP --> Custom Graphs. (slab
works just fine ...)
But, I am still having a problem getting a graph for my data.
Question:
You have a MSG= set but you don't send it in the
'status' message?
You do send the pair space separated though.
I am sending about 8 lines of information from the MIBS
of the Juniper first.
Then sending the PAIR of values.
I originally was doing a 'status' and then a 'data' 'bb'
command and that did not work.
After I have parsed the information, it looks like this when you
click the ICON (IP changed):
Wed Jun 9 15:33:59 MDT 2010
ON-LINE Appliance
SSLVPN2 at 128.170.68.3 is the ON-LINE Juniper SSL-VPN server
ICON:online=GREEN
SNMP-Juniper.sh: Wed Jun 9 15:33:59 MDT 2010
INTERNAL VIRTUAL IP........: 128.170.999.999 ON-LINE
Appliance
EXTERNAL VIRTUAL IP........: 128.170.888.889
DEVICE.....................: SSLVPN2
APPLIANCE IP...............: 128.170.999.999
NAME.......................: IVE2 CLR1=clear CLR2=green
NUMBER OF WEB USERS........: 335
SOFTWARE VERSION...........: 6.5R2 (build 14951)
COLOR......................: green
GRAPH DATA.................: [USERS:335]
LAST STATUS................: [IVE1=clear|IVE2=green|Wed Jun 9
15:28:57 MDT 2010]
MAC ADDRESSES..............: 0:30:48:75:45:3c Internal-MAC
128.170.999.998
0:30:48:75:45:3d External-MAC
128.170.999.999
USERS : 335
The 'USERS : 335' is the value to use as a pair.
Here is the snippet of code where I send it in from:
/home/xymon/client/ext/SNMP-Juniper.sh
L=log-file
# Now we send the status message to Xymon
# ---------------------------------------
BB=/home/xymon/server/bin/bb
BBDISP=127.0.0.1
$BB $BBDISP "status $DEVICE.$COLUMN $COLOR `date`
${MSG2}
USERS : $USERS
"
RC=$?
if [ "$RC" -eq 0 ]; then
echo -e " Return Code from STATUS 'bb': 0"$L else echo -e " Return Code from STATUS 'bb': $RC" $L fi
Here is the entry in /home/xymon/server/etc/hobbitlaunch.cfg:
All other info about the other scripts has been removed.
[hobbitclient]
ENVFILE /home/xymon/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD /home/xymon/client/bin/hobbitclient.sh
LOGFILE $BBSERVERLOGS/hobbitclient.log
INTERVAL 5m
Entry in /home/xymon/server/etc/hobbitserver.cfg:
TEST2RRD=" ... ,online=ncv, slab-ncv"
And
NCV_online="USERS:GAUGE"
NCV_slab="inodecache:GAUGE,dentrycache:GAUGE"
IS 'online' the incorrect term?
Entry in /home/xymon/server/etc/hobbitgraph.cfg:
▸
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600 users\n
GPRINT:in:LAST:Cur\: %6.2lf %s
GPRINT:in:MAX: Max\: %6.2lf %s
GPRINT:in:MIN: Min\: %6.1lf %s
GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n
# End of SNMP-Juniper.sh graph
# Tom Schmitt Xymon HELP --> Custom Graphs
[slab]
TITLE Slab info
YAXIS Bytes
DEF:inode=slab.rrd:inodecache:AVERAGE
DEF:dentry=slab.rrd:dentrycache:AVERAGE
LINE2:inode#00CCCC:Inode cache
LINE2:dentry#FF0000:Dentry cache
COMMENT:\n
GPRINT:inode:LAST:Inode cache \: %5.1lf%s (cur)
GPRINT:inode:MAX: \: %5.1lf%s (max)
GPRINT:inode:MIN: \: %5.1lf%s (min)
GPRINT:inode:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:dentry:LAST:Dentry cache\: %5.1lf%s (cur)
GPRINT:dentry:MAX: \: %5.1lf%s (max)
GPRINT:dentry:MIN: \: %5.1lf%s (min)
GPRINT:dentry:AVERAGE: \: %5.1lf%s (avg)\n
# End of Tom Schmitt Xymon HELP --> Custom Graphs
▸
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 3:01 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tom,
For this test the hobbitserver is the client, so
client/ext/somescript.sh is where the script is at. Sorry I completely
missed that when looking at what you wrote!
So from client/etc/clientlaunch.cfg:
[NA2CPU]
ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
CMD $HOBBITCLIENTHOME/ext/na2.sh
LOGFILE $HOBBITCLIENTHOME/logs/na2.log
INTERVAL 2m
Script outputs same data format as yours
...
NA2CPU="`$EGREP Busy $datafile | $AWK '{print $2}'`"
if [ $NA2CPU -gt 78 ]
then
COLOR=red
MSG="na2 CPU load is high"
fi
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
NA2CPU : ${NA2CPU}
"
...
From the main server/etc/hobbitlauch.cfg you should already have:
[hobbitclient]
ENVFILE $somepath/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD $somepath/client/bin/hobbitclient.sh
LOGFILE $BBSERVERLOGS/hobbitclient.log
INTERVAL 5m
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Pardon me for asking, but I am trying to compare and isolate my
problem.
What is the name and location of the script your are running?
Usually in server/ext directory.
What is the name of the ICON to place the graph under?
What does the 'bb' command that sends the data look like?
And, what does the data pair(s) look like? E.g. "USERS:228" or
"USERS : 229", etc.
What did you add to hobbitlaunch.cfg?
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tom Schmitt
Tim, Not sure what you mean by client display? I looked in /home/xymon/server/etc/hobbitserver.cfg but could not find anything.
▸
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 3:09 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Also, the test is listed under the hobbitserver-as-a-client display as
NA2CPU. Sorry for these mistakes/ommisions :)
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Pardon me for asking, but I am trying to compare and isolate my
problem.
What is the name and location of the script your are running?
Usually in server/ext directory.
What is the name of the ICON to place the graph under?
What does the 'bb' command that sends the data look like?
And, what does the data pair(s) look like? E.g. "USERS:228" or
"USERS : 229", etc.
What did you add to hobbitlaunch.cfg?
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tim McCloskey
Tom, I am only sending the data as "NA2CPU : 25" without the quotes and where 25 is some variable that was extracted from a datafile (which in turn was created by parsing some MIB data). By client display I mean the test appears in the web gui in the same row as tests for the server's cpu/ram/httpd/disk, etc. It has a column heading of NA2CPU and the (hopefully) green icon is in this column. I'll read you other mail which has more details later today to see if we are even speaking of the same thing.
▸
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 3:00 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: Tim McCloskey
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Not sure what you mean by client display?
I looked in /home/xymon/server/etc/hobbitserver.cfg but could
not find anything.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 3:09 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Also, the test is listed under the hobbitserver-as-a-client display as
NA2CPU. Sorry for these mistakes/ommisions :)
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Pardon me for asking, but I am trying to compare and isolate my
problem.
What is the name and location of the script your are running?
Usually in server/ext directory.
What is the name of the ICON to place the graph under?
What does the 'bb' command that sends the data look like?
And, what does the data pair(s) look like? E.g. "USERS:228" or
"USERS : 229", etc.
What did you add to hobbitlaunch.cfg?
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Tim McCloskey
Tom,
I am sending only 1 line of data, there is another example below where I send 3 lines of data and use two. The MSG var was a sloppy leftover from snagging an example script, probably slabinfo - disregard it.
When changing a graph stanza in hobbitgraph.cfg I normally kill the old rrd file. There are ways to parse those rrd files to see what info is in there (look at rrdtool dump options). Might be a good idea to see if you are even getting the data or if you are getting NAN. NA2CPU : ${NA2CPU} note the quoting
By the way, what do you have in:
/home/xymon/client/etc/clientlaunch.cfg?
I'm sure that others on the list who are more familiar with this can assist if you are not able to sort it out with my scattered bits of info....
Here is another example where data is sent and graphed:
From client/ext script which runs from client/etc/clientlaunch.cfg
# spew
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `$DT`
`$MYSQLADMIN --port=$port -u$user -p$pass extended-status | $GREP -i $var | $AWK '{print "Bytesrecevied:",$4}'`
`$MYSQLADMIN --port=$port -u$user -p$pass extended-status | $GREP -i $var2 | $AWK '{print "Bytessent:",$4}'`
`$MYSQLADMIN --port=$port -u$user -p$pass extended-status | $GREP $var3 | $AWK '{print "Connections:",$4}'`
"
Hobbit Graph. Ugly Hobbit Graph.
[mysqltraffic]
-w 640
-h 480
-W mysqltraffic
TITLE MySQL Traffic
YAXIS Bytes
--units=si
-o
DEF:In=mysqltraffic.rrd:Bytesrecevied:AVERAGE
DEF:Out=mysqltraffic.rrd:Bytessent:AVERAGE
AREA:In#0000FF:Bytes In:STACK
AREA:Out#33FF00:Bytes Out:STACK
COMMENT:\n
GPRINT:In:LAST:In\: %5.1lf%s (cur)
GPRINT:In:MIN:\: %5.1lf%s (min)
GPRINT:In:MAX:\: %5.1lf%s (max)
GPRINT:In:AVERAGE:\: %5.1lf%s (avg)\n
GPRINT:Out:LAST:Out\: %5.1lf%s (cur)
GPRINT:Out:MIN:\: %5.1lf%s (min)
GPRINT:Out:MAX:\: %5.1lf%s (max)
GPRINT:Out:AVERAGE:\: %5.1lf%s (avg)\n
Good Luck,
-t
▸
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:45 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: Tim McCloskey
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
That worked for the example under HELP --> Custom Graphs. (slab
works just fine ...)
But, I am still having a problem getting a graph for my data.
Question:
You have a MSG= set but you don't send it in the
'status' message?
You do send the pair space separated though.
I am sending about 8 lines of information from the MIBS
of the Juniper first.
Then sending the PAIR of values.
I originally was doing a 'status' and then a 'data' 'bb'
command and that did not work.
After I have parsed the information, it looks like this when you
click the ICON (IP changed):
Wed Jun 9 15:33:59 MDT 2010
ON-LINE Appliance
SSLVPN2 at 128.170.68.3 is the ON-LINE Juniper SSL-VPN server
ICON:online=GREEN
SNMP-Juniper.sh: Wed Jun 9 15:33:59 MDT 2010
INTERNAL VIRTUAL IP........: 128.170.999.999 ON-LINE
Appliance
EXTERNAL VIRTUAL IP........: 128.170.888.889
DEVICE.....................: SSLVPN2
APPLIANCE IP...............: 128.170.999.999
NAME.......................: IVE2 CLR1=clear CLR2=green
NUMBER OF WEB USERS........: 335
SOFTWARE VERSION...........: 6.5R2 (build 14951)
COLOR......................: green
GRAPH DATA.................: [USERS:335]
LAST STATUS................: [IVE1=clear|IVE2=green|Wed Jun 9
15:28:57 MDT 2010]
MAC ADDRESSES..............: 0:30:48:75:45:3c Internal-MAC
128.170.999.998
0:30:48:75:45:3d External-MAC
128.170.999.999
USERS : 335
The 'USERS : 335' is the value to use as a pair.
Here is the snippet of code where I send it in from:
/home/xymon/client/ext/SNMP-Juniper.sh
L=log-file
# Now we send the status message to Xymon
# ---------------------------------------
BB=/home/xymon/server/bin/bb
BBDISP=127.0.0.1
$BB $BBDISP "status $DEVICE.$COLUMN $COLOR `date`
${MSG2}
USERS : $USERS
"
RC=$?
if [ "$RC" -eq 0 ]; then
echo -e " Return Code from STATUS 'bb': 0"$L else echo -e " Return Code from STATUS 'bb': $RC" $L fi
Here is the entry in /home/xymon/server/etc/hobbitlaunch.cfg:
All other info about the other scripts has been removed.
[hobbitclient]
ENVFILE /home/xymon/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD /home/xymon/client/bin/hobbitclient.sh
LOGFILE $BBSERVERLOGS/hobbitclient.log
INTERVAL 5m
Entry in /home/xymon/server/etc/hobbitserver.cfg:
TEST2RRD=" ... ,online=ncv, slab-ncv"
And
NCV_online="USERS:GAUGE"
NCV_slab="inodecache:GAUGE,dentrycache:GAUGE"
IS 'online' the incorrect term?
Entry in /home/xymon/server/etc/hobbitgraph.cfg:
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600 users\n
GPRINT:in:LAST:Cur\: %6.2lf %s
GPRINT:in:MAX: Max\: %6.2lf %s
GPRINT:in:MIN: Min\: %6.1lf %s
GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n
# End of SNMP-Juniper.sh graph
# Tom Schmitt Xymon HELP --> Custom Graphs
[slab]
TITLE Slab info
YAXIS Bytes
DEF:inode=slab.rrd:inodecache:AVERAGE
DEF:dentry=slab.rrd:dentrycache:AVERAGE
LINE2:inode#00CCCC:Inode cache
LINE2:dentry#FF0000:Dentry cache
COMMENT:\n
GPRINT:inode:LAST:Inode cache \: %5.1lf%s (cur)
GPRINT:inode:MAX: \: %5.1lf%s (max)
GPRINT:inode:MIN: \: %5.1lf%s (min)
GPRINT:inode:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:dentry:LAST:Dentry cache\: %5.1lf%s (cur)
GPRINT:dentry:MAX: \: %5.1lf%s (max)
GPRINT:dentry:MIN: \: %5.1lf%s (min)
GPRINT:dentry:AVERAGE: \: %5.1lf%s (avg)\n
# End of Tom Schmitt Xymon HELP --> Custom Graphs
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 3:01 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tom,
For this test the hobbitserver is the client, so
client/ext/somescript.sh is where the script is at. Sorry I completely
missed that when looking at what you wrote!
So from client/etc/clientlaunch.cfg:
[NA2CPU]
ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
CMD $HOBBITCLIENTHOME/ext/na2.sh
LOGFILE $HOBBITCLIENTHOME/logs/na2.log
INTERVAL 2m
Script outputs same data format as yours
...
NA2CPU="`$EGREP Busy $datafile | $AWK '{print $2}'`"
if [ $NA2CPU -gt 78 ]
then
COLOR=red
MSG="na2 CPU load is high"
fi
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
NA2CPU : ${NA2CPU}
"
...
From the main server/etc/hobbitlauch.cfg you should already have:
[hobbitclient]
ENVFILE $somepath/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD $somepath/client/bin/hobbitclient.sh
LOGFILE $BBSERVERLOGS/hobbitclient.log
INTERVAL 5m
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: Trying to create a graph
Tim,
Pardon me for asking, but I am trying to compare and isolate my
problem.
What is the name and location of the script your are running?
Usually in server/ext directory.
What is the name of the ICON to place the graph under?
What does the 'bb' command that sends the data look like?
And, what does the data pair(s) look like? E.g. "USERS:228" or
"USERS : 229", etc.
What did you add to hobbitlaunch.cfg?
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Wednesday, June 09, 2010 2:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] RE: Trying to create a graph
Not sure if this will help or just mis-guide you so take with a grain of
salt.
Your config looks very similar to one of the graphs I recently added for
a NetApp box. One thing that I did differently is in the use of the
names. Here is an example:
hobbitserver.cfg:NCV_NA2CPU="NA2CPU:GAUGE"
NA2CPU=ncv is also defined in the other two vars in that file.
hobbitgraph.cfg
...
[NA2CPU]
-W redacted
TITLE NetApp2 CPU Busy
YAXIS NA2 CPU
DEF:NA2CPU=NA2CPU.rrd:NA2CPU:AVERAGE
COMMENT:5 min delayed \n
AREA:NA2CPU#00CC00:NA2CPU
GPRINT:NA2CPU:LAST: \: %5.0lf (cur)
GPRINT:NA2CPU:MAX: \: %5.0lf (max)
GPRINT:NA2CPU:MIN: \: %5.0lf (min)
GPRINT:NA2CPU:AVERAGE: \: %5.0lf (avg)\n
...
Regards,
Tim
From: user-9c1ae820b621@xymon.invalid [user-9c1ae820b621@xymon.invalid]
Sent: Wednesday, June 09, 2010 12:06 PM
To: user-ae9b8668bcde@xymon.invalid
Cc: W.J.M. Nelis
Subject: [hobbit] Trying to create a graph
All assistance is greatly appreciated!
I have a simple number that I want to have graphed in Xymon.
Running 4.3.0-0.beta2 on CentOS 5.4.
I have a script that is populating the information from our Juniper
SSLVPN device(s).
I created a new ICON 'online' where there is a lot of information passed
for display by clicking the 'online' icon.
This is done using 'bb' with 'status'.
One of the values displayed is the number of web users.
I create a file of values for a history but I want to pass the value
from each run to the Xymon as 'data' to 'bb'.
The pair from each run is: USERS:277 with the 277 changing with
every 5 minute run.
I placed the script in the /home/xymon/server/ext directory called:
SNMP-Juniper.sh
Per the Xymon Help --> custom graphs document:
I edited the following files:
/home/xymon/server/etc/hobbitlaunch.cfg
# Tom Schmitt script in server/ext
directory
[online]
ENVFILE /home/xymon/server/etc/hobbitserver.cfg
CMD
/home/xymon/server/ext/SNMP-Juniper.sh
LOGFILE
$BBSERVERLOGS/SNMP-Juniper.sh.log
INTERVAL 5m
/home/xymon/server/etc/hobbitgraph.cfg
I only want to see a single line showing the number of
USERS at the 5 minute timeframes.
# Tom Schmitt SNMP-Juniper.sh in ext directory
[online]
TITLE Count of Juniper
Users
YAXIS Users
DEF:in=online.rrd:online:AVERAGE
AREA:in#00CC00:Usage
COMMENT:Licensed for 600
users\n
GPRINT:in:LAST:Cur\:
%6.2lf %s
GPRINT:in:MAX: Max\:
%6.2lf %s
GPRINT:in:MIN: Min\:
%6.1lf %s
GPRINT:in:AVERAGE:Avg\:
%6.2lf %s\n
# End of SNMP-Juniper.sh graph
/home/xymon/server/etc/hobbitserver.cfg
At the end of the TEST2RRD=".....,online=ncv"
At the end of the GRAPHS=".....,online"
This was mentioned elsewhere so I tried it.
Added the following line:
NCV_online="USERS:GAUGE"
I only see a small graph box with "X hobbitgraph ncv:online" in the box
under the icons: online and trends
But no data graphed
If you click on it, you get the hourly, daily, weekly monthly graph as a
small box with no data either.
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list Dominique Frise
▸
On 06/ 9/10 09:06 PM, user-9c1ae820b621@xymon.invalid wrote:
All assistance is greatly appreciated! I have a simple number that I want to have graphed in Xymon. Running 4.3.0-0.beta2 on CentOS 5.4. I have a script that is populating the information from our Juniper SSLVPN device(s). I created a new ICON ‘online’ where there is a lot of information passed for display by clicking the ‘online’ icon. This is done using ‘bb’ with ‘status’. One of the values displayed is the number of web users. I create a file of values for a history but I want to pass the value from each run to the Xymon as ‘data’ to ‘bb’. The pair from each run is: USERS:277 with the 277 changing with every 5 minute run.
Make sure you have a carriage return after your pair.
▸
I placed the script in the /home/xymon/server/ext directory called: SNMP-Juniper.sh Per the Xymon Help à custom graphs document: I edited the following files: /home/xymon/server/etc/hobbitlaunch.cfg # Tom Schmitt script in server/ext directory [online] ENVFILE /home/xymon/server/etc/hobbitserver.cfg CMD /home/xymon/server/ext/SNMP-Juniper.sh LOGFILE $BBSERVERLOGS/SNMP-Juniper.sh.log INTERVAL 5m /home/xymon/server/etc/hobbitgraph.cfg I only want to see a single line showing the number of USERS at the 5 minute timeframes. # Tom Schmitt SNMP-Juniper.sh in ext directory [online] TITLE Count of Juniper Users YAXIS Users DEF:in=online.rrd:online:AVERAGE
This line should be: DEF:in=online.rrd:USERS:AVERAGE
▸
AREA:in#00CC00:Usage COMMENT:Licensed for 600 users\n GPRINT:in:LAST:Cur\: %6.2lf %s GPRINT:in:MAX: Max\: %6.2lf %s GPRINT:in:MIN: Min\: %6.1lf %s GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n # End of SNMP-Juniper.sh graph /home/xymon/server/etc/hobbitserver.cfg At the end of the TEST2RRD=”…..,online=ncv” At the end of the GRAPHS=”…..,online” This was mentioned elsewhere so I tried it. Added the following line: NCV_online=”USERS:GAUGE” I only see a small graph box with “X hobbitgraph ncv:online” in the box under the icons: online and trends But no data graphed If you click on it, you get the hourly, daily, weekly monthly graph as a small box with no data either. */Thanks,/* */ /* */Tom Schmitt/* /Senior IT Staff - R&D/ L-3 Communication Systems West 640 North 2200 West P.O. Box 16850 Salt Lake City, UT XXXXX
Phone (801) /594-3030/
Cell (XXX) XXX-XXXX
eFax (413) /480-6873/
*/user-9c1ae820b621@xymon.invalid/*
*/ /**\\\\||////**//*
*/ /**\ ~ ~ / **//*
*/ /**| @ @ | **//*
*--oOo---(_)---oOo--**//*
Dominique
list W.J.M. Nelis
Tim,
▸
Tim,
That worked for the example under HELP --> Custom Graphs. (slab
works just fine ...)
But, I am still having a problem getting a graph for my data.
Question:
You have a MSG= set but you don't send it in the
'status' message?
You do send the pair space separated though.
I am sending about 8 lines of information from the MIBS
of the Juniper first.
Then sending the PAIR of values.
I originally was doing a 'status' and then a 'data' 'bb'
command and that did not work.
After I have parsed the information, it looks like this when you
click the ICON (IP changed):
Wed Jun 9 15:33:59 MDT 2010
ON-LINE Appliance
SSLVPN2 at 128.170.68.3 is the ON-LINE Juniper SSL-VPN server
ICON:online=GREEN
SNMP-Juniper.sh: Wed Jun 9 15:33:59 MDT 2010
INTERNAL VIRTUAL IP........: 128.170.999.999 ON-LINE
Appliance
EXTERNAL VIRTUAL IP........: 128.170.888.889
DEVICE.....................: SSLVPN2
APPLIANCE IP...............: 128.170.999.999
NAME.......................: IVE2 CLR1=clear CLR2=green
NUMBER OF WEB USERS........: 335
SOFTWARE VERSION...........: 6.5R2 (build 14951)
COLOR......................: green
GRAPH DATA.................: [USERS:335]
LAST STATUS................: [IVE1=clear|IVE2=green|Wed Jun 9
15:28:57 MDT 2010]
MAC ADDRESSES..............: 0:30:48:75:45:3c Internal-MAC
128.170.999.998
0:30:48:75:45:3d External-MAC
128.170.999.999
USERS : 335
The 'USERS : 335' is the value to use as a pair.
If you have no graph, you could click on the magnifying glass, which is located on the right of the graph. Often that will show an error message, which gives a clue about the problem. In your case the number of lines with a colon in it might be a problem. NCV might find multiple Name-Colon-Value triplets, and RRD will then complain about undefined datasets. In such cases, I replace all colons outside the intended NCV triplets by ":", a colon in HTML parlance. HTH, Wim Nelis. ******************************************************************************************************* The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages. *******************************************************************************************************
list Patrick Nixon
two things I would look at 1.) See if you have actual data in the rrd file, if not, no graph (rrdtool dump FILENAME) 2.) See if changeing it from label:value to label : value makes a difference.
▸
On Wed, Jun 9, 2010 at 3:06 PM, <user-9c1ae820b621@xymon.invalid> wrote:All assistance is greatly appreciated! I have a simple number that I want to have graphed in Xymon. Running 4.3.0-0.beta2 on CentOS 5.4. I have a script that is populating the information from our Juniper SSLVPN device(s). I created a new ICON ‘online’ where there is a lot of information passed for display by clicking the ‘online’ icon. This is done using ‘bb’ with ‘status’. One of the values displayed is the number of web users. I create a file of values for a history but I want to pass the value from each run to the Xymon as ‘data’ to ‘bb’. The pair from each run is: USERS:277 with the 277 changing with every 5 minute run. I placed the script in the /home/xymon/server/ext directory called: SNMP-Juniper.sh Per the Xymon Help à custom graphs document: I edited the following files: /home/xymon/server/etc/hobbitlaunch.cfg # Tom Schmitt script in server/ext directory [online] ENVFILE /home/xymon/server/etc/hobbitserver.cfg CMD /home/xymon/server/ext/SNMP-Juniper.sh LOGFILE $BBSERVERLOGS/SNMP-Juniper.sh.log INTERVAL 5m /home/xymon/server/etc/hobbitgraph.cfg I only want to see a single line showing the number of USERS at the 5 minute timeframes. # Tom Schmitt SNMP-Juniper.sh in ext directory [online] TITLE Count of Juniper Users YAXIS Users DEF:in=online.rrd:online:AVERAGE AREA:in#00CC00:Usage COMMENT:Licensed for 600 users\n GPRINT:in:LAST:Cur\: %6.2lf %s GPRINT:in:MAX: Max\: %6.2lf %s GPRINT:in:MIN: Min\: %6.1lf %s GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n # End of SNMP-Juniper.sh graph /home/xymon/server/etc/hobbitserver.cfg At the end of the TEST2RRD=”…..,online=ncv” At the end of the GRAPHS=”…..,online” This was mentioned elsewhere so I tried it. Added the following line: NCV_online=”USERS:GAUGE” I only see a small graph box with “X hobbitgraph ncv:online” in the box under the icons: online and trends But no data graphed If you click on it, you get the hourly, daily, weekly monthly graph as a small box with no data either. Thanks, Tom Schmitt Senior IT Staff - R&D L-3 Communication Systems West 640 North 2200 West P.O. Box 16850 Salt Lake City, UT XXXXX Phone (XXX) XXX-XXXX Cell (XXX) XXX-XXXX eFax (XXX) XXX-XXXX user-9c1ae820b621@xymon.invalid \\\\||//// \ ~ ~ / | @ @ | --oOo---(_)---oOo--