how to add SNMP Fields via adding a new Data Query via CLI

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

Moderators: Developers, Moderators

Post Reply
plotting4fun
Posts: 24
Joined: Thu Dec 11, 2008 10:42 am

how to add SNMP Fields via adding a new Data Query via CLI

Post by plotting4fun »

Hi !
I am trying to add the "Used Space" graphs on a device, via the CLI.

Here are the interesting parameters :
[root@ukmon002 cli]# php add_graphs.php --list-snmp-queries|grep "SNMP.*Par"
8 SNMP - Get Mounted Partitions
[root@ukmon002 cli]#

[root@ukmon002 cli]# php add_graphs.php --list-graph-templates|grep "MIB.*Disk"
26 Host MIB - Available Disk Space
[root@ukmon002 cli]#

[root@ukmon002 cli]# php add_graphs.php --snmp-query-id=8 --list-query-types
Known SNMP Query Types: (id, name)
18 Available Disk Space
[root@ukmon002 cli]#
But I don't have the good SNMP fields !

If I had by hand, in the web interface, "Add Data Query: SNMP - Get Mounted Partitions "
It goes from :
[root@ukmon002 cli]# php add_graphs.php --list-snmp-fields --host-id=11

Known SNMP Fields for host-id 11: (name)
ifDescr
ifHwAddr
ifIndex
ifIP
ifOperStatus
ifSpeed
ifType

[root@ukmon002 cli]#


to


[root@ukmon002 cli]# php add_graphs.php --list-snmp-fields --host-id=11

Known SNMP Fields for host-id 11: (name)
hrStorageAllocationUnits
hrStorageDescr
hrStorageIndex
ifDescr
ifHwAddr
ifIndex
ifIP
ifOperStatus
ifSpeed
ifType

[root@ukmon002 cli]#
How can I add these fields using the CLI ?
Thanks ! :D
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please fetch add_data_query.php from Cacti SVN branch 087. This will be part of 087c as well
Reinhard
outspoken
Posts: 17
Joined: Thu Nov 20, 2008 4:51 pm

Post by outspoken »

excellent, was just needing this too.
plotting4fun
Posts: 24
Joined: Thu Dec 11, 2008 10:42 am

Post by plotting4fun »

Many thanks gandalf, it works perfectly ! :D
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests