Get multi values by custom snmp script

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Cloud
Posts: 9
Joined: Tue Jun 03, 2008 10:18 am

Get multi values by custom snmp script

Post by Cloud »

I have several values to get from remote servers,although I can write a script to print one value each time,I want this script only run once and then get all the values.
So I write a script like this:
#./cloud_srv.csh index (Get the index)
1
2
3
...
#./cloud_srv.csh desc (Get the define of each line)
Data_type1
Data_type2
Data_type3
...
#./cloud_srv.csh value (Get the values)
132342132
12
345342
...

Now I found it seems that cacti didn't support to get values like this:I want each Data_type1 can be used as a 'Internal Data Source Name',but cacti data query consider each column as the internal DSN.

So am I right?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Get multi values by custom snmp script

Post by phalek »

did you look here for how to do this ?

http://docs.cacti.net/manual:088:3a_adv ... put_method

Bascially you need to return data in this format:

Code: Select all

inOctest:1123 usercount:512 data:9085
so a list of <name>
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Cloud
Posts: 9
Joined: Tue Jun 03, 2008 10:18 am

Re: Get multi values by custom snmp script

Post by Cloud »

Thanks,phalek.
It's a remote client in my situation,so I can't use the method that you gived to me.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Get multi values by custom snmp script

Post by phalek »

Hi Cloud,

I'm not quite sure what you mean. The script you already created can probably be enhanced to take the remote server ip and SNMP data so it retrieves the data from a remote system dynamically. The data itself just needs to be presented/re-arranged a bit.

Could you provide a bit more technical info on what you have and what you want to achieve ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Cloud
Posts: 9
Joined: Tue Jun 03, 2008 10:18 am

Re: Get multi values by custom snmp script

Post by Cloud »

phalek wrote:Hi Cloud,

I'm not quite sure what you mean. The script you already created can probably be enhanced to take the remote server ip and SNMP data so it retrieves the data from a remote system dynamically. The data itself just needs to be presented/re-arranged a bit.

Could you provide a bit more technical info on what you have and what you want to achieve ?
Sorry for my unclear post.

The script 'cloud_srv.csh' is on the client,not on the cacti server,I use snmp extend(Before it was exec) function on the client,so I can use snmpwalk to get these values from cacti server.

After I review the cacti docs,I think maybe the easiest way for my requirement is just what you said:use 'Data Input Method'.I can write another script on the cacti server to fetch it.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests