SNMP - Get Mounted Partitions trunkating hrStorageDescr

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
luckysob
Posts: 8
Joined: Wed Oct 28, 2009 3:00 pm

SNMP - Get Mounted Partitions trunkating hrStorageDescr

Post by luckysob »

I am using the builtin template for mounted partitions, I am recieving all of the data ok, but the title of my graphs is not displaying the entire hrStorageDescr. Here is my example:

Title should be title |host_description| - |query_hrStorageDescr|

When I go to Data Sources and select one of the rras you see
Index Type: hrStorageDescr
Index Value: Disk partition /path/to/mnt


But the titles on my graphs are "hostname - Disk partition" <-- notice the /path/to/mnt is missing

It just chops off the last argument! So I have no idea what partition each graph represents.

Please help
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Re: SNMP - Get Mounted Partitions trunkating hrStorageDescr

Post by mcutting »

Have a look at Settings > Visual > Maximum Title Length and increase this value
Then Management > Graph Management > Choose Target > Drop Down List = "Reapply Suggested Names"

See if this makes any difference.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
luckysob
Posts: 8
Joined: Wed Oct 28, 2009 3:00 pm

Re: SNMP - Get Mounted Partitions trunkating hrStorageDescr

Post by luckysob »

Tried that and no luck... It was set to 80 and I changed it 160.
luckysob
Posts: 8
Joined: Wed Oct 28, 2009 3:00 pm

Re: SNMP - Get Mounted Partitions trunkating hrStorageDescr

Post by luckysob »

Help Please? As you can see below the data is returned fine from the SNMP request, but when its sent to RRD its chopping off the important info... Also the page to "create graphs" has the full description, so I believe the issue is somewhere when rrd command is generated.

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at '/local/mnt/cacti-0.8.7g/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/local/mnt/www/php/bin/php -q /local/mnt/cacti-0.8.7g/scripts/ss_host_disk.php afs-l1 22 1:1691:500:1:10:netmgmtro:::::: index'
+ Executing script query '/local/mnt/www/php/bin/php -q /local/mnt/cacti-0.8.7g/scripts/ss_host_disk.php afs-l1 22 1:1691:500:1:10:netmgmtro:::::: query index'
+ Found item [hrStorageIndex='1'] index: 1
+ Found item [hrStorageIndex='2'] index: 2
+ Found item [hrStorageIndex='3'] index: 3
+ Found item [hrStorageIndex='4'] index: 4
+ Found item [hrStorageIndex='5'] index: 5
+ Found item [hrStorageIndex='6'] index: 6
+ Found item [hrStorageIndex='7'] index: 7
+ Found item [hrStorageIndex='8'] index: 8
+ Found item [hrStorageIndex='9'] index: 9
+ Found item [hrStorageIndex='10'] index: 10
+ Found item [hrStorageIndex='11'] index: 11
+ Found item [hrStorageIndex='12'] index: 12
+ Found item [hrStorageIndex='13'] index: 13
+ Found item [hrStorageIndex='14'] index: 14
+ Found item [hrStorageIndex='15'] index: 15
+ Found item [hrStorageIndex='16'] index: 16
+ Found item [hrStorageIndex='17'] index: 17
+ Found item [hrStorageIndex='18'] index: 18
+ Found item [hrStorageIndex='19'] index: 19
+ Found item [hrStorageIndex='20'] index: 20
+ Found item [hrStorageIndex='21'] index: 21
+ Found item [hrStorageIndex='22'] index: 22
+ Found item [hrStorageIndex='23'] index: 23
+ Found item [hrStorageIndex='24'] index: 24
+ Found item [hrStorageIndex='25'] index: 25
+ Executing script query '/local/mnt/www/php/bin/php -q /local/mnt/cacti-0.8.7g/scripts/ss_host_disk.php afs-l1 22 1:1691:500:1:10:netmgmtro:::::: query description'
+ Found item [hrStorageDescr='Physical RAM'] index: 1
+ Found item [hrStorageDescr='Virtual Memory'] index: 2
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/rootvol'] index: 3
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/var'] index: 4
+ Found item [hrStorageDescr='Temp Filesystem (swap) /var/run'] index: 5
+ Found item [hrStorageDescr='Temp Filesystem (swap) /tmp'] index: 6
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepo'] index: 7
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepr'] index: 8
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepq'] index: 9
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/viceps'] index: 10
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepp'] index: 11
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepu'] index: 12
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepv'] index: 13
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepw'] index: 14
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepx'] index: 15
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepz'] index: 16
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepy'] index: 17
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicept'] index: 18
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepn'] index: 19
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/vice'] index: 20
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/mnt'] index: 21
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepa'] index: 22
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepb'] index: 23
+ Found item [hrStorageDescr='Disk partition /dev/vx/dsk/afsdg/vicepc'] index: 24
+ Found item [hrStorageDescr='Swap'] index: 25


/opt/rrdtool-1.4.4/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='afs-l1 - Disk partition ' \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='bytes' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/local/mnt/cacti-0.8.7g/rra/afs-l1_hdd_used_510.rrd":hdd_total:AVERAGE \
DEF:b="/local/mnt/cacti-0.8.7g/rra/afs-l1_hdd_used_510.rrd":hdd_used:AVERAGE \
AREA:a#002A97FF:"Total" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:b#F51D30FF:"Used" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"
monsoft
Posts: 20
Joined: Fri Oct 16, 2009 4:22 am
Location: London, UK

Re: SNMP - Get Mounted Partitions trunkating hrStorageDescr

Post by monsoft »

I had this same issue. You need to change "Setup->Visual->Data Queries->Maximum Field Length" to more than 15 characters
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests