Hi, This is one of my least favorite things of xymon. It really shouldn't be this hard.
I've had a script that pulls the %mem of certain processes on various machines. Right now, I have 3 separate groups of machines with different processes being watched. The purpose is to track memory leaks.
Previously, I had the script just put out a ps -eo 'pid,%mem,cmd' for the desired processes. Then others wanted a graph, so I've reformatted the output to be just a keyword (either the process name or a significant field of the arguments of the command).
I get something that looks like this now:
Process Memory Usage
SA: 6.5 MBIM: 2.4 OI: 4.1 Process' alert levels are defined in /usr/local/etc/procmem.cfg When levels are exceeded, restarting of the process to free memory is recommended
xymProcMem,v 1.7 2014/07/07 20:37:17 ptroot Exp ptroot $
My first iteration, I used <br> to separate the lines. That was a mistake, the source of the html showed them all on one line. I've changed to \n, and that to me should provide the proper output.
However, looking at the rrd dump, I only get the first one:
<!-- Round Robin Database Dump --><rrd> <version> 0003 </version> <step> 300 </step> <!-- Seconds --> <lastupdate> 1404828303 </lastupdate> <!-- 2014-07-08 09:05:03 CDT -->
<ds>
<name> SA </name>
<type> GAUGE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> NaN </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> 6.5 </last_ds>
<value> NaN </value>
<unknown_sec> 3 </unknown_sec>
</ds>
<ds>
<name> xymProcMemv16201407 </name>
<type> DERIVE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> NaN </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> 50 </last_ds>
<value> NaN </value>
<unknown_sec> 3 </unknown_sec>
</ds>
My TEST2RRD looks like:
TEST2RRD="cpu=la,disk,inode,...,nfmsgw=ncv,hpnasnapshot=ncv,ProcMemory=ncv"
And the NCV definitions: NCV_hpnasnapshot="TotaldevicesinDB:GAUGE,Totalactivedevicesi:GAUGE,Totalinactivedevice:GAUGE,Totaldeviceswithout:GAUGE,Pctactive:GAUGE,Pctinactive:GAUGE,Pctnodriver:GAUGE,Activeattemptedsucc:GAUGE,Activeattemptedunsu:GAUGE,Activebutnotattempt:GAUGE,PctAttemptedsuccess:GAUGE,PctAttemptedunsucce:GAUGE,PctActivebutnotatte:GAUGE" NCV_ProcMemory="SA:GAUGE,MBIM:GAUGE,OI:GAUGE,MNS1:GAUGE,NMS1:GAUGE,NMS2:GAUGE,NMS11:GAUGE,NMS12:GAUGE,NMS13:GAUGE,NMS14:GAUGE,NMS15:GAUGE,TCMgmtEngine:GAUGE,TCTFTP:GAUGE,TCSyslog:GAUGE,SWIM:GAUGE"
The hpnasnapshot graph works. I've been using it as an example.
Obviously, without all the data in the rrd, there is no point in trying to get a graph to show.
Any ideas from anyone?
Thanks, Paul.
Paul Root Lead Engineer CenturyLink Network Reliability Operations Center
600 Stinson Blvd, N.E. Flr 2N Minneapolis, MN 55413 Direct: (651)312-5207 Paul.Root at centurylink.com
On 9 July 2014 02:20, Root, Paul T <Paul.Root at centurylink.com> wrote:
I get something that looks like this now:
Your status text looks OK to me. As does your configuration settings.
xymProcMem,v 1.7 2014/07/07 20:37:17 ptroot Exp ptroot $
Except for this. You realise that this is being interpreted as an NCV line? That's how you got your second DS.
My first iteration, I used <br> to separate the lines.That was a mistake, the source of the html showed them all on one line.
But also created the second DS called "xymProcMemv16201407" (from the version string, non-text removed, truncated to 19 chars).
I’ve changed to \n, and that to me should provide the proper output.
Too late, the DS names were already set.
<name> xymProcMemv16201407 </name>
Once the RRD file is created, it won't get recreated with any new DS names. You have to delete the RRD file, or do an export/edit/import process to get the DS names you need.
J
Hi,
I've had a script that pulls the %mem of certainprocesses on various machines. Right now, I have 3 separate groups of machines with different processes being watched. The purpose is to track memory leaks.
Previously, I had the script just put out a ps --eo'pid,%mem,cmd' for the desired processes. Then others wanted a graph, so I've reformatted the output to be just a keyword (either the process name or a significant field of the arguments of the command).
I get something that looks like this now:Process Memory Usage
SA: 6.5
MBIM: 2.4
OI: 4.1
You might consider using the devmon-way of reporting data in stead of NCV. It has the advantage that you can report data to be entered in multiple RRD's. In Devmon one RRD per interface is use, in your case one RRD per group of machines could be used. The devmon format has also the advantage that colons or equal-signs in the message will not confuse the extractor of the RRD data.
Regards, Wim Nelis.
The NLR disclaimer is valid for NLR e-mail messages.
This message is only meant for providing information. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of the sender. This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. Sender accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
Yes, I'm working on that now. I pretty quickly came to the realization that the single RRD file wasn't going to work.
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of W.J.M. Nelis Sent: Wednesday, July 09, 2014 1:49 AM To: xymon at xymon.com Subject: Re: [Xymon] custom graphs
Hi,
I've had a script that pulls the %mem of certain processes on various machines. Right now, I have 3 separate groups of machines with different processes being watched. The purpose is to track memory leaks.
Previously, I had the script just put out a ps -eo 'pid,%mem,cmd' for the desired processes. Then others wanted a graph, so I've reformatted the output to be just a keyword (either the process name or a significant field of the arguments of the command).
I get something that looks like this now:
Process Memory Usage
SA: 6.5 MBIM: 2.4 OI: 4.1
You might consider using the devmon-way of reporting data in stead of NCV. It has the advantage that you can report data to be entered in multiple RRD's. In Devmon one RRD per interface is use, in your case one RRD per group of machines could be used. The devmon format has also the advantage that colons or equal-signs in the message will not confuse the extractor of the RRD data.
Regards, Wim Nelis.
The NLR disclaimer is valid for NLR e-mail messages.
This message is only meant for providing information. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of the sender.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. Sender accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
participants (3)
-
jlaidman@rebel-it.com.au
-
Paul.Root@CenturyLink.com
-
Wim.Nelis@nlr.nl