Basic SMNP output -> Cacti input question.

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
venquessa
Posts: 10
Joined: Wed Jun 15, 2005 3:30 pm

Basic SMNP output -> Cacti input question.

Post by venquessa »

Hello,

How do I get an SMNP output like:

TP:10 TN:547 FP:3 FN:29 SC:0 NC:8

To be parsed via a Data Template?

I've managed it many a time with script output, but I can't seem to get it to work with SNMP data fetched from an OID.

I remember getting round this before by creating a script to call snmp with an OID as argument, but is there a way to get multi-data sources from the single OID parsed.

Thanks
Paul
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Your work around is a script.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
venquessa
Posts: 10
Joined: Wed Jun 15, 2005 3:30 pm

Post by venquessa »

Something like?

Code: Select all

#!/bin/bash

host=$1
oid=$2

snmpget -c public -v 2c $1 $2 | sed "s/.*STRING: //"
Well it works :)

Thanks

Paul
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests