graphcacti

cacti - issue on using one graph template for different devices


I created a bash script to get the disk usage of a linux ubuntu server. After that, I created a graph template (using the data source which contains the bash script to get the disk usage of a server). Then I created 2 different devices which points to different servers.

It automatically created 2 graphs based on the devices I created. Something like this:

Server 1 - Disk Usage
Server 2 - Disk Usage

After I placed the graphs on different trees, I noticed that they have the same disk usage.

Server 1:

enter image description here

Server 2:

enter image description here

As you can see, they both have 20%. But in reality, only Server 1 is 20%. Server 2 should be 14%. It's like the graph for Server 2 is using the output of the script intended for Server 1, and not getting the output of the script for Server 2. Can someone tell me a possible workaround or solution for this? I'm only new to cacti so it's a bit hard for me to understand how this works.

Thanks!


Solution

  • I was told that a bash script will only be run on the cacti server, and not on remote servers.

    https://github.com/Cacti/cacti/issues/3458