I'm wondering if it's possible to do the following using Cacti: have a graph for a remote machine (not running SNMP) with a line for the used space (percentage) for each partition of the disk.
So that will allow me to monitor the disk usage for each partition on the same graph, will be very helpful I think.
Any ideas on how it could be done best?
Disk Usage through SSH script
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
There are several users world-wide using ssh to poll hosts. It's just much slower though.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
YOu have to keep two things in mind: When using ssh, be aware of the fact that the scripts are executed by the cactiuser given in your crontab. You will have to perform kex exchange for this user. When using ssh for Script Queries, this is even needed for the httpd's user (when running Verbose Query or adding the Query for the first time)
If you think about adding partitions to a single graph, this will result in a big problem, because the number of partitions will vary between target host's. And there is no such thing as a Graph Template with variable number of Graph Items. If the number is fixed, there's a way, of course.
Reinhard
If you think about adding partitions to a single graph, this will result in a big problem, because the number of partitions will vary between target host's. And there is no such thing as a Graph Template with variable number of Graph Items. If the number is fixed, there's a way, of course.
Reinhard
This part is already done and working.You will have to perform kex exchange for this user. When using ssh for Script Queries, this is even needed for the httpd's user (when running Verbose Query or adding the Query for the first time)
Right, that's the problem. Well, I suppose I could make a graph template for 2 partitions and another for 3 partitions (since most of my servers have 2 or 3 partitions that need to be monitored). The question, Reinhard, is how to get the mount point name for each partition on the graphs. Without the device or mount point names, the graphs will obviously be useless. Now I can get the device/mount names using script queries, but can I get multiple lines in a graph usign script query (as opposed to script/command) ?If you think about adding partitions to a single graph, this will result in a big problem, because the number of partitions will vary between target host's. And there is no such thing as a Graph Template with variable number of Graph Items. If the number is fixed, there's a way, of course.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Yep, this is possible. Even Script Queries do create a single set of rrd files for each index, not one big rra containg all data. From the Graph Template's point of view, these rrd's are independant, so you can combine them in one single Graph (please search for Overview Graphs and see http://forums.cacti.net/viewtopic.php?t=5703). Theh partition name should be handled as a <direction>input</direction> XML field, so you can display it in graphs as a text using |query_<field_name>| syntax. When combining partitions, this will not be used as a title, but perhaps with COMMENT statementsar1 wrote:The question, Reinhard, is how to get the mount point name for each partition on the graphs. Without the device or mount point names, the graphs will obviously be useless. Now I can get the device/mount names using script queries, but can I get multiple lines in a graph usign script query (as opposed to script/command) ?
Reinhard
Who is online
Users browsing this forum: No registered users and 0 guests