Hi,
I don't know if I understood this right but since 0.6.6 I can have a script spitting out several lines as a result and I can put that data rightaway into cacti, right?
Before I always had several scripts.
Example: Before:
bw-in.sh outputs 170898
bw-out.sh output 19283746
Now:
bw.sh outputs
170898
19283746
(in 2 lines)
Now, I've tried this and it doesn't work. Anything special I need to do?
multiple data sources
Moderators: Developers, Moderators
Ok, here's the bw-ip.sh
#!/bin/bash
echo `sudo /sbin/iptables -xnvL $2 | grep $1 | awk {'print $2'}`
a call like
bw-ip.sh 127.0.0.1 INPUT
gives you the result
iptables should contain a rule like this in the INPUT chain
411K 40M all -- any any anywhere 127.0.0.1
The only thing I don't like is sudo. If I sudo iptables from nobody to root anybody could theoretically compromise the firewall rules...
#!/bin/bash
echo `sudo /sbin/iptables -xnvL $2 | grep $1 | awk {'print $2'}`
a call like
bw-ip.sh 127.0.0.1 INPUT
gives you the result
iptables should contain a rule like this in the INPUT chain
411K 40M all -- any any anywhere 127.0.0.1
The only thing I don't like is sudo. If I sudo iptables from nobody to root anybody could theoretically compromise the firewall rules...
Very well
I made it to the graphs
THe source looks right
DEF:a="/i1/data/web/FV/iip/admin/acc/rra/iip_bw_16.rrd":iip_bw_16:AVERAGE
AREA:a#3D168B:"ip16 input: 116582933"
STACK:a#EACC00:"ip16 output: 714227845
It even outputs these numbers correctly in the graph's text line
But the graph itself displays nothing
What's the trick?
I made it to the graphs
THe source looks right
DEF:a="/i1/data/web/FV/iip/admin/acc/rra/iip_bw_16.rrd":iip_bw_16:AVERAGE
AREA:a#3D168B:"ip16 input: 116582933"
STACK:a#EACC00:"ip16 output: 714227845
It even outputs these numbers correctly in the graph's text line
But the graph itself displays nothing
What's the trick?
Who is online
Users browsing this forum: No registered users and 0 guests