[xymon] Making a custom graph
Buchan Milne
bgmilne at staff.telkomsa.net
Fri Feb 18 11:06:53 CET 2011
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
More information about the Xymon
mailing list