These oids are custom for AlefmobitechProducts and represents various KPIs for Cache and Packet processing modules.
Please suggest me how to use such custom wrapper script to strip off "c" character from last.
See this below logs
2015-04-08 11:10:26 [10146] [1] Found Performance Data for CacheServerDevKol / alefCacheJpegBytesIn (SNMPv2-SMI::enterprises.45390.1.3.1.12.1.1.3.0=1736441c)
Please suggest,
Thanks
Rajesh
how to create services of various OIDs of a mib file in one
-
alef1_nagiosxi
- Posts: 7
- Joined: Thu Apr 02, 2015 4:27 am
Re: how to create services of various OIDs of a mib file in
The two methods for dealing with are:
1. Find an integer oid for this metric.
2. Build a wrapper script (WARNING: this is an untested scratch):
snmp_wrapper.sh:
You would then call it like:
1. Find an integer oid for this metric.
2. Build a wrapper script (WARNING: this is an untested scratch):
snmp_wrapper.sh:
Code: Select all
#!/bin/bash
HOST="$1"
COMMUNITY="$2"
PROTO="$3"
OID="$4"
OUTPUT=$(/usr/local/nagios/libexec/check_snmp -H "$HOST" -C "$COMMUNITY" -P "$PROTO" -o "$OID")
EXIT=$(echo $?)
echo "$OUTPUT" | sed 's/c$//g'
exit $EXITCode: Select all
./snmp_wrapper.sh 192.168.50.170 public 2c ".1.3.6.1.4.1.45390.1.3.1.2.0"Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.