Making a custom graph

Tim McCloskey tm at freedom.com
Thu Feb 17 22:18:22 CET 2011


Hi,

My two cents....

Most of my graphs are very simple but I still run into occasional troubles that need to be sorted out.  Maybe this will help, maybe not....

On your example; unless the ^tcp lines are needed then I would send only the Name Colon Value of 'sessions : 17'.  Also, after making script changes and in-between the stop - start I would remove any old psessions.RRD files.  Then check to see if the new rrd files are still giving you Not A Number.  I assume you already have a stanza in hobbitgraph.cfg to display.

Regards, 

Tim

________________________________________
From: Root, Paul [Paul.Root at qwest.com]
Sent: Thursday, February 17, 2011 12:58 PM
To: 'xymon at xymon.com'
Subject: [xymon] Making a custom graph

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" ?

Paul.




Paul Root
Lead Internet Systems Eng
Qwest Network Services


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful.  If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

To unsubscribe from the xymon list, send an e-mail to
xymon-unsubscribe at xymon.com





More information about the Xymon mailing list