Xymon Mailing List Archive search

Making a custom graph

10 messages in this thread

list Paul Root · Thu, 17 Feb 2011 14:58:41 -0600 ·
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.
list Tim McCloskey · Thu, 17 Feb 2011 13:18:22 -0800 ·
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
quoted from Paul Root

From: Root, Paul [user-c80045f511e8@xymon.invalid]
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.
list Paul Root · Thu, 17 Feb 2011 15:25:27 -0600 ·
Nope, I need the tcp lines.
quoted from Tim McCloskey


Paul Root
Lead Internet Systems Eng
Qwest Network Services


-----Original Message-----
From: Tim McCloskey [mailto:user-440820cc07d6@xymon.invalid]
Sent: Thursday, February 17, 2011 3:18 PM
To: xymon at xymon.com
Subject: [xymon] RE: Making a custom graph

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 [user-c80045f511e8@xymon.invalid]
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.


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.
list Bill Arlofski · Thu, 17 Feb 2011 16:53:17 -0500 ·
On 02/17/11 16:25, Root, Paul wrote:
Nope, I need the tcp lines.
Hi Paul, why not have your script use sed or tr to convert the colons to
something else? Dashes or spaces come to mind and would look OK.


--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
list W.J.M. Nelis · Fri, 18 Feb 2011 08:31:49 +0100 ·
Hello Paul,
quoted from Paul Root
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 
"&#58;", 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 "&#61;".

  Wim Nelis.


*******************************************************************************************************
The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages.
*******************************************************************************************************
list Buchan Milne · Fri, 18 Feb 2011 12:06:53 +0200 ·
quoted from W.J.M. Nelis
On Thursday, 17 February 2011 22:58:41 Root, Paul wrote:
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.
Is there any reason you aren't using the built-in PORTS feature, e.g.

# hobbit-clients.cfg
HOST=xxx
	PORT LOCAL=*:8022 0 STATE=ESTABLISHED TRACK=hpna COL=green

That would give you a graph with name hpna of established to the local 8022 
port.

Regards,
Buchan
list Paul Root · Fri, 18 Feb 2011 06:51:20 -0600 ·
Good question. I didn't think of that.
quoted from Buchan Milne


Paul Root
Lead Internet Systems Eng
Qwest Network Services


-----Original Message-----
From: Buchan Milne [mailto:user-9b139aff4dec@xymon.invalid]
Sent: Friday, February 18, 2011 4:07 AM
To: xymon at xymon.com
Cc: Root, Paul
Subject: Re: [xymon] Making a custom graph

On Thursday, 17 February 2011 22:58:41 Root, Paul wrote:
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.
Is there any reason you aren't using the built-in PORTS feature, e.g.

# hobbit-clients.cfg
HOST=xxx
        PORT LOCAL=*:8022 0 STATE=ESTABLISHED TRACK=hpna COL=green

That would give you a graph with name hpna of established to the local 8022
port.

Regards,
Buchan

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.
list Paul Root · Fri, 18 Feb 2011 10:21:38 -0600 ·
quoted from Buchan Milne
-----Original Message-----
From: Buchan Milne [mailto:user-9b139aff4dec@xymon.invalid]
Sent: Friday, February 18, 2011 4:07 AM
To: xymon at xymon.com
Cc: Root, Paul
Subject: Re: [xymon] Making a custom graph
On Thursday, 17 February 2011 22:58:41 Root, Paul wrote:
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

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.
Is there any reason you aren't using the built-in PORTS feature, e.g.
# hobbit-clients.cfg
HOST=xxx
      PORT LOCAL=*:8022 0 STATE=ESTABLISHED TRACK=hpna COL=green
That would give you a graph with name hpna of established to the local 8022
port.

The one problem is that we had a situation where a number of connections was stuck in CLOSE-WAIT. I'm guessing this isn't going to track that. Or is it?

Can I set STATE to CLOSE-WAIT? The man page suggests not.
quoted from Paul Root


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.
list Ralph Mitchell · Fri, 18 Feb 2011 12:34:55 -0500 ·
quoted from Paul Root
On Fri, Feb 18, 2011 at 11:21 AM, Root, Paul <user-c80045f511e8@xymon.invalid> wrote:
-----Original Message-----
From: Buchan Milne [mailto:user-9b139aff4dec@xymon.invalid]
Sent: Friday, February 18, 2011 4:07 AM
To: xymon at xymon.com
Cc: Root, Paul
Subject: Re: [xymon] Making a custom graph
On Thursday, 17 February 2011 22:58:41 Root, Paul wrote:
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

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.
Is there any reason you aren't using the built-in PORTS feature, e.g.
# hobbit-clients.cfg
HOST=xxx
      PORT LOCAL=*:8022 0 STATE=ESTABLISHED TRACK=hpna COL=green
That would give you a graph with name hpna of established to the local
8022
port.

The one problem is that we had a situation where a number of connections
was stuck in CLOSE-WAIT. I'm guessing this isn't going to track that. Or is
it?

Can I set STATE to CLOSE-WAIT? The man page suggests not.

The man page says the state can be anything that netstat reports:

STATE=state

Causes only the sockets in the specified state to be included, "state" is
usually LISTEN or ESTABLISHED but can be any socket state reported by the
clients "netstat" command.


As long as netstat gives you CLOSE-WAIT, it should be possible to track it.

Ralph Mitchell
list Buchan Milne · Fri, 18 Feb 2011 22:39:59 +0200 ·
quoted from Ralph Mitchell
On Friday, 18 February 2011 18:21:38 Root, Paul wrote:
-----Original Message-----
From: Buchan Milne [mailto:user-9b139aff4dec@xymon.invalid]
Sent: Friday, February 18, 2011 4:07 AM
To: xymon at xymon.com
Cc: Root, Paul
Subject: Re: [xymon] Making a custom graph
On Thursday, 17 February 2011 22:58:41 Root, Paul wrote:
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
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.
Is there any reason you aren't using the built-in PORTS feature, e.g.
# hobbit-clients.cfg
HOST=xxx
      PORT LOCAL=*:8022 0 STATE=ESTABLISHED TRACK=hpna COL=green
That would give you a graph with name hpna of established to the local
8022 port.
The one problem is that we had a situation where a number of connections
was stuck in CLOSE-WAIT. I'm guessing this isn't going to track that. Or
is it?

Can I set STATE to CLOSE-WAIT? The man page suggests not.
I've used TIME_WAIT:


        PORT LOCAL=%([.:]389) STATE=ESTABLISHED MIN=0 MAX=750 COL=yellow
        PORT LOCAL=%([.:]389) STATE=ESTABLISHED TRACK=ldap MIN=0 MAX=900 COL=red
        PORT LOCAL=%([.:]389) STATE=TIME_WAIT MIN=0 MAX=1500 COL=yellow
        PORT LOCAL=%([.:]389) STATE=TIME_WAIT TRACK=ldap-wait MIN=0 MAX=2500 COL=red

So I see no reason why CLOSE_WAIT wouldn't work:
quoted from Ralph Mitchell

STATE=state
      Causes only the sockets in  the  specified  state  to  be included,
      "state" is usually LISTEN or ESTABLISHED but can be any socket state
      reported by the clients "netstat" command.


Regards,
Buchan