I have some logs created with ipfm like:
# Host In (bytes) Out (bytes) Total (bytes)
192.168.20.104 612155984 213082975 825238959
192.168.20.102 200876717 14986100 215862817
192.168.20.103 148533421 1239463 149772884
--------------------------------------------
I have trafic.sh with this content:
#!/bin/sh
HOST=$1
D=`/bin/date +%Y-%m-%d`
#Incoming
cat /var/log/ipfm/ipfm-global-$D |/bin/grep $HOST | /usr/bin/gawk '{print "Input:"$2 " Output:"$3}'
---------------------------------------------------------
When i run the script like
[root@shaper scripts]#./trafic.sh 192.168.20.104
the output is:
Input:612155984 Output:213082975
How can i create a graphic with this 2 value.
I try this:
In Data Input Methods (Script Command)
Input string <path_cacti>/scripts/trafic.sh <ip> and i add 2 Ouput fileds(Input, Outputl) and 1 input (ip).
----------------------------------------------------
I want to use this script like template because the <ip> is variable
I don't want to use individual script for every host in part (but is ok)
So' i'm lost....... what is the next step.
Hint me .. i have input:xxxxx and output:yyy values
PLS help!
Cacti and ipfm graphics for every host
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Please read my HowTos at docs.cacti.net. They cover this and more
Reinhard
Reinhard
Who is online
Users browsing this forum: No registered users and 1 guest