Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
running on the same system. When I compare the graph on both, it looks like this script is in reverse to the "ucd/net snmp Device (Disk) I/O templates - Updated - v2". The read become write and write become read.
Which one is correct, i cannot confirm.
SH
I'm pretty sure originally it was wrong. I have a machine running apache web server with awstats processing logs at a certain time of day. Originally cacti was reporting it was reading from disk all the time and when awstats kicks in, writes spike. That didn't make sense at all. Most of what the web server is reading should be in file system cache so it doesn't need to actually read from disk but it should be writing to disk all the time for apache logs. And when awstats kicks in, it should be reading the logs from disk far much more than writing processed data to disk.
I also have a machine running mysql (primarily innodb) continuously, and originally cacti was reporting disk reads throughout the entire time while writes were minimal. But that machine has enough memory to hold the entire database so it shouldn't be reading from disk that much. On the other hands, all db writes require disk write. Plus:
I think the quick cure/walkaround this problem is to modify our snmpd.conf to have the read and write value reverse.
Sadly net-snmp.5.4.1 that I have for my RHELv4 cannot return the disk IO data using ucd-net. That is why I use this script.
But for openSUSE 10.2 and above, it can return the disk IO using ucd-net...thus I can use the other script.
I just download net-snmp-5.4.1.1-1.src.rpm. I going to compile it in RHELv4 and install it. I hope this new snmp can report back the disk IO without using this script bash file.
I tried the latest net-snmp-5.4.1.1-1 rpm but still the same. Looks like for RHEL, I need to compile the net-snmp manually from the source code using the correct parameters.
Too lazy to do that, I modify the snmpdiskio script in such a way that the content of function
hdOutBlocks & hdInBlocks swapped. That should solve the Read => Write and Write => Read problem.
super-hornet wrote:I tried the latest net-snmp-5.4.1.1-1 rpm but still the same. Looks like for RHEL, I need to compile the net-snmp manually from the source code using the correct parameters.
Too lazy to do that, I modify the snmpdiskio script in such a way that the content of function
hdOutBlocks & hdInBlocks swapped. That should solve the Read => Write and Write => Read problem.
SH
Yeah, that's the right way to do it, since snmpdiskio is not part of a major linux distribution...
Hi Can you please post more detail im not able to find two cacti templets
skion wrote:
elgoretto wrote:Ok I've reinstalled a brand new 0.8.7b cacti, and my contribution to partition.xml is still valid.
With this method, you can get rid of the snmpio script (no need to maintain it anymore) and no need to have a specific snmp.conf setup (but you still need to add diskIO feature at net-snmp compilation time).
Thanks elgoretto, this works like a charm!
For the record, what i did was:
- import the two cacti templates from the original post
- copy elgoretto's partitions file to /usr/share/cacti/resource/snmp_queries/partition.xml
- in cacti, add the SNMP disk statistics data query to the hosts you want
- in cacti, add some graphs
- voila, nothing else needed
super-hornet wrote:I tried the latest net-snmp-5.4.1.1-1 rpm but still the same. Looks like for RHEL, I need to compile the net-snmp manually from the source code using the correct parameters.
Too lazy to do that, I modify the snmpdiskio script in such a way that the content of function
hdOutBlocks & hdInBlocks swapped. That should solve the Read => Write and Write => Read problem.
SH
can you post the modified script stuck for RHEL 4.0
Hi
I downloaded the script and did the installation as described in the read me file on CentOS with kernel 2.6
If I execute the commands in the snmpd file manually it works just fine
/usr/local/bin/snmpdiskio hdNum
24
However the graph is not returning any data, a verbose query shows :
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/apache2/htdocs/cacti/resource/snmp_queries/partition.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.101'
+ No SNMP data returned
+ Found data query XML file at '/usr/local/apache2/htdocs/cacti/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/usr/local/apache2/htdocs/cacti/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/usr/local/apache2/htdocs/cacti/resource/snmp_queries/partition.xml'
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/partition.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.101'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/partition.xml'
I have this problem when running on a Debian Lenny 64 bits :
> snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55 = No Such Object available on this agent at this OID
I restart the snmp deamon, my snmpdiskio works fine.
Any idea ?
Regards
Hello guys...
For those who have quite some machines/disk to monitor and using LVM.... You might be interested in this. I have added some changes to the last version of snmpdiskio found here to translate the dm-X devices into some human readable name which means something....
Code is below and the support is only for 2.6 kernel....
Feel free to add some more changes. Feedback is always welcome.
Can anyone help me get going with this? I'm running net-snmp 5.4 which I think may be causing the problem. I posted for help in the linux/unix specific section but got no replies so I guess it's better to post to this thread. I'm including my initial post at the bottom of this.
As an update since then, I've updated to the latest snmpdiskio script in the post above me to be able to resolve LVM names, and discovered that part of my problem was pasting the script into a too narrow ssh window and getting extra junk returns. I'm now at a point where I can do a successful snmpwalk as show below, but as you can see the data comes back at .1.3.6.1.4.1.2021.xx.4 instead of 101. I've edited my partition.xml to look at .4 instead of .101 and the "Create graphs for this host" wizard seems to work just fine now, but all the graphs I try to create just come back with no data ("NaN"). The graphs do actually get created, but just have no data.
megamojo wrote:Hi all. I'm relatively new to cacti and the world of SNMP monitoring, but pretty comfortable working with linux in general. I'm trying to get diskio working as outlined in this thread and I'm hitting a wall of frustration. If I run these commands:
If I try to use exec as instructed in the readme instead of extend I get a message that there was nothing to be found at all, and with either extend or exec the cacti gui tells me there was nothing returned from the query.
I'm running Slackware 12.2 with SNMP version 5.4.2.1. I've re-compiled net-snmp with
and that doesn't seem to have made any difference at all. I really don't have a preference on whether my diskio data comes from this script or the "native" ucd diskio MIBs, but I can't get either to work.
I've searched the forums and that thread and the thread with the updated snmpdiskio script in it and found others with the same problem, but they seem to have resolved it themselves without saying how.