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
:
Server 2
:
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!
I was told that a bash script will only be run on the cacti server, and not on remote servers.