Hello,
I want to monitor CPU using SNMP/WMI/Perl SDK rather than deploying xymon-client on my boxes (on some of them, it is even not possible to compile/run xymon). So I went for writing custom scripts.
The first script I have is an SNMP Bash script that polls things like UCD-SNMP-MIB::ssCpuRawUser.0.
In my "server/ext/snmp_cpu.sh", I have setup BBHTAG="snmp_cpu" and COLUMN="snmp_cpu".
In the "etc/hobbit/hobbitserver.cfg", I have updated TEST2RDD adding ",snmp_cpu=ncv" and "NCV_snmp_cpu=”ssCpuRawUser0:GAUGE...".
In the "etc/hobbit/hobbitlaunch.cfg", I have added:
Returns CPU statistics from SNMP
[snmp_cpu] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD $BBHOME/ext/snmp_cpu.sh LOGFILE $BBSERVERLOGS/bb-retest.log INTERVAL 5m
In the "etc/hobbit/hobbitgraph.cfg", I have added: [snmp_cpu] TITLE CPU Statistics YAXIS Usage (%) DEF:user=snmp_cpu.rrd:ssCpuRawUser0:AVERAGE (...)
Then restarted xymon-server.
Now, I have a "snmp_cpu" column with status updated and graphs generated. But what I would like is to have the column named "cpu" and not "snmp_cpu".
If I simply set 'COLUMN="cpu"' in the snmp_cpu.sh script, then a new "cpu" column appears, show my script value but doesn't graph ; the reference to the graph is "service=la". Furthermore, the "snmp_cpu" column is still there.
What do I miss so that my "snmp_cpu" service appears as "cpu" in the main view. The idea is to have a bunch of snmp_cpu, wmi_cpu scripts appearring as "cpu".
TIA, Jo
participants (1)
-
joel@carnat.net