Multiple script output

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply

Multiple script output

#1 Post by melix » Tue Aug 05, 2003 4:33 am

I am trying to create a graph that allows to get multiple pings, for different hosts.

I created the following perl script :

Code: Select all


foreach $host  (@ARGV)
   $ping = `ping -c 1 $host -w 1 | grep icmp_seq`;
   $ping =~ m/(.*time=)(.*) (ms|usec)/;

   print "$host:$2 ";
Here is an example of the output for the following command :


Outputs :

I've tried to set up different data sources, graph templates, and so on, but I can't find how I can graph such a result... Can anyone help me creating a graph, step by step ?


Cacti Guru User
Posts: 3018
Joined: Sun Aug 27, 2017 12:05 am

Re: Multiple script output

#2 Post by netniV » Wed Oct 30, 2019 7:06 pm

You would need to look at a script server script. You would have to have the same hosts passed each time so that the indexing works properly to return the values for each host too. If you return it using the multi-value format of

Code: Select all

host1:5 host2:11 host3:7
That should then be translatable into the graphs.

Post Reply