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?
Get multi values by custom snmp script
Moderators: Developers, Moderators
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: Get multi values by custom snmp script
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:
so a list of <name>
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
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
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
Re: Get multi values by custom snmp script
Thanks,phalek.
It's a remote client in my situation,so I can't use the method that you gived to me.
It's a remote client in my situation,so I can't use the method that you gived to me.
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: Get multi values by custom snmp script
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 ?
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
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
Re: Get multi values by custom snmp script
Sorry for my unclear post.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 ?
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.
Who is online
Users browsing this forum: No registered users and 2 guests