[xymon] Making a custom graph
W.J.M. Nelis
Wim.Nelis at nlr.nl
Fri Feb 18 08:31:49 CET 2011
Hello Paul,
> Hi,
> I have a simple script that counts the number of connects we have for a certain port. Specifically, the ssh proxy port for HP NA.
>
> My output looks like this:
>
> Concurrent SSH Sessions
>
>
>
> Sessions : 17
>
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 :::8022 :::* LISTEN
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.70:1810 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.8.82.127:2452 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.156:1370 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.70:1384 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.154:3148 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.26:1339 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.98:2275 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.139:2359 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.192.176:1549 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.8.86.4:1433 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.8.86.144:3018 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.192.144:1368 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.8.86.162:1818 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.1.193.147:1446 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.8.82.146:2830 ESTABLISHED
> tcp 0 0 ::ffff:199.168.33.8:8022 ::ffff:10.8.82.16:2923 ESTABLISHED
>
>
> I see that I have issues as there are a bunch of colons. I want to graph just the number of sessions for each interval.
>
> So I add "sshConns=ncv" to TEST2RRD
> And add the line
>
> NCV_sshConns="Sessions:GAUGE"
>
> To the end of hobbitserver.cfg. Oh, Xymon 4.2.3 currently. I have a test server on 4.3.0rc1, but it's not getting this data.
>
> Then I killed hobbitd_rrd (both).
>
> The rrd file is created but it's not good:
>
> <!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
> <step> 300 </step> <!-- Seconds -->
> <lastupdate> 1297975982 </lastupdate> <!-- 2011-02-17 14:53:02 CST -->
>
> <ds>
> <name> pSessions </name>
> <type> DERIVE </type>
> <minimal_heartbeat> 600 </minimal_heartbeat>
> <min> NaN </min>
> <max> NaN </max>
>
> <!-- PDP Status -->
> <last_ds> 18 </last_ds>
> <value> 3.0333333333e-01 </value>
> <unknown_sec> 0 </unknown_sec>
> </ds>
>
> <!-- Round Robin Archives --> <rra>
> <cf> AVERAGE </cf>
> <pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
>
> <params>
> <xff> 5.0000000000e-01 </xff>
> </params>
> <cdp_prep>
> <ds>
> <primary_value> 1.2330383481e-03 </primary_value>
> <secondary_value> 1.2330383481e-03 </secondary_value>
> <value> NaN </value>
> <unknown_datapoints> 0 </unknown_datapoints>
> </ds>
> </cdp_prep>
> <database>
> <!-- 2011-02-15 14:55:00 CST / 1297803300 --> <row><v> NaN </v></row>
> <!-- 2011-02-15 15:00:00 CST / 1297803600 --> <row><v> NaN </v></row>
> <!-- 2011-02-15 15:05:00 CST / 1297803900 --> <row><v> NaN </v></row>
> <!-- 2011-02-15 15:10:00 CST / 1297804200 --> <row><v> NaN </v></row>
> .
> .
> .
> <!-- 2011-02-16 18:00:00 CST / 1297900800 --> <row><v> NaN </v></row>
> </database>
> </rra>
> </rrd>
>
>
>
> How to I get Xymon to just look at the one line "Sessions : 18" ?
>
Some remarks, which are probably not the he complete solution to your
problem.
A) The type you define for ssh_Conns is GAUGE but is DERIVE in the RRD.
What happens if you remove the RRD?
B) You could replace each occurrence of a colon in the status message by
":", except for int the intended NCV line. Thus the colons in the
status message still appear as a colon on your screen, but Xymon won't
see it as a colon. For the same reason, any "=" in the status message
could be replaced by "=".
Wim Nelis.
*******************************************************************************************************
The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages.
*******************************************************************************************************
More information about the Xymon
mailing list