Automatic generation of a SNMP probe

SNMP probes are very tedious to create, because of the mapping of textual representation of OID to numerical OID.

So jrds provides a commande line tool that can generate a template for a snmp probe. To use it :

java -jar /…/boot.jar dosnmpprobe arguments

and it will dump a xml probe description (almost) ready to be used. The argument used are :

  • —-name the probe description name
  • —-probename the probe name
  • —-probeclass the java probe class, but it should be automaticaly set
  • —-index to specify the index OID
  • —-graphs a comma separated list of graph names, that will need to be created afterward
  • —-specific a comma separated list of specific parameters
  • —-collect a comme separated list of OID to collect
  • —-uptimefactor to set the uptime factor
  • —-uniqindex to set the unicity boolean of the index

All OID will be given to snmptranslate -Td -On to resolve them. So values like RFC1213-MIB::ifInOctets should be used. Don't forget to have a good collection of MIB file to really play with it.

For example, to regenerate an existing probe :

java -jar .../WEB-INF/lib/boot.jar dosnmpprobe --Name DiskIo64  --probeName 'io64-${index}' --index UCD-DISKIO-MIB::diskIODevice --graphs DiskIoGraphBytes,DiskIoGraphReq,DiskIoGraphSize --collect UCD-DISKIO-MIB::diskIONReadX,UCD-DISKIO-MIB::diskIONWrittenX,UCD-DISKIO-MIB::diskIOReads,UCD-DISKIO-MIB::diskIOWrites
snmp_probes.txt · Last modified: 2011/03/22 02:12 by root     Back to top