Cacti NetApp Ontap API data query
I have been using the excellent template and scripts from this forum post, however, when the NetApp device is loaded with LUNs and volumes, the script will cause the Cacti to timeout, and during that time, consume CPU. The original cause of this problem was a workaround to some NetApp Perl API bug the original author found, which forced him to query the entire data set for each sub-query. This is nice for five, or even ten volumes, but when you’re around 400 volumes, things just look bad.
Due to that, I have taken upon myself to make this script more scalable, but forcing a single data query from the NetApp for each data type (volume, LUN, system, etc) and data query type (get, index, etc). A unique file was created with its name being the storage_device_name.data_type.query_type. Following queries to any subset of this data were just accessing this file, and not the remote NetApp device, killing network, CPU, and tending to time out on operation and leave huge blank parts in the graphs.
I will post my modified template in the forum as well, but I place it here, just so that it will be both available for me, and for any interested reader.
Get it here:NetApp_OnTap-SDK_cacti-20130623.tar.gz
looks great what you have done here!
What do you know about this “+ missing in XML file, ‘Index Count Changed’ emulated by counting arg_index entries”
+ Running data query [13].
+ Found type = ‘4’ [Script Query].
+ Found data query XML file at ‘/usr/share/cacti/resource/script_queries/query-netapp-ontapsdk-lun.xml’
+ XML file parsed ok.
+ missing in XML file, ‘Index Count Changed’ emulated by counting arg_index entries
+ Executing script for list of indexes ‘/usr/share/cacti/scripts/netapp-get-data.sh 1.16.10.2 “monitor” “xxx” lun index’ Index Count: 0
+ Executing script query ‘/usr/share/cacti/scripts/netapp-get-data.sh 192.168.10.21 “monitor” “xxx” lun query index’
Do you know how tho fix this?
It usually either means that there is an empty response for your query, or that there is a bug somewhere… 🙂
Ez
I think so.. 😛
Trying to get your version of this to work on Cacti 0.8.8b.
Edit the line 5 in XML’s. Removes the “missing in xml” error, not sure if this is the issue though..
“index to index
The scripts returns correct list of luns/stats when i run them from terminal on the server…
verbose query
+ Running data query [10].
+ Found type = ‘4’ [Script Query].
+ Found data query XML file at ‘/usr/share/cacti/resource/script_queries/query-netapp-ontapsdk-volume.xml’
+ XML file parsed ok.
+ missing in XML file, ‘Index Count Changed’ emulated by counting arg_index entries
+ Executing script for list of indexes ‘/usr/share/cacti/scripts/netapp-get-data.sh 1.16.10.2 “monitor” “monitormonitor1” volume index’ Index Count: 0
+ Executing script query ‘/usr/share/cacti/scripts/netapp-get-data.sh 1.16.10.2 “monitor” “monitormonitor1” volume query index’
Seems like it cannot get the correct index count, do you have an idea how to fix this?
Nope. Sorry. I can try to check, but it actually works on some of my customers’ sites so well, compared to the past, that I have not touched it in a very long while. Usually it should mean that the values were modified during the query process. Weird.
Ez