Operating System: debian
Webserver: Apache 2.2.9
Cacti: 0.8.7b
Spine: 0.8.7c
Plugin Architecture: sun sparc
i've try to build a script witch request the RAS Sessions from a windows server2003 box.
Code: Select all
#!/bin/sh
echo -n 'ras1:'
var1=$(cat /usr/share/cacti/site/scripts/mdatmp | grep 'TCP-MIB::tcpConnectionState.ipv4."10.100.2.1"' | wc -l)
echo -n "$var1"
echo -n ' ras2:'
var2=$(cat /usr/share/cacti/site/scripts/mdatmp | grep 'TCP-MIB::tcpConnectionState.ipv4."10.100.1.1"' | wc -l)
echo "$var2"
Code: Select all
box2:/usr/share/cacti/site/scripts# perl ./ras.sh
ras1:371 ras2:79
box2:/usr/share/cacti/site/scripts#
i've setting it up to cacti, but in the weblog shows:
Code: Select all
03/03/2011 04:25:07 PM - SPINE: Poller[0] Host[38] DS[998] SCRIPT: /usr/share/cacti/site/scripts/ras.sh, output: U
03/03/2011 04:25:07 PM - SPINE: Poller[0] Host[38] DS[998] WARNING: Result from SCRIPT not valid. Partial Result: ras1...
03/03/2011 04:25:05 PM - SPINE: Poller[0] Host[37] DS[999] SCRIPT: /usr/share/cacti/site/scripts/ras.sh, output: U
03/03/2011 04:25:05 PM - SPINE: Poller[0] Host[37] DS[999] WARNING: Result from SCRIPT not valid. Partial Result: ras1...
Code: Select all
/usr/share/cacti/site/scripts/ras.sh: line 3: echo: write error: Broken pipe
/usr/share/cacti/site/scripts/ras.sh: line 4: echo: write error: Broken pipe
/usr/share/cacti/site/scripts/ras.sh: line 6: echo: write error: Broken pipe
/usr/share/cacti/site/scripts/ras.sh: line 3: echo: write error: Broken pipe
/usr/share/cacti/site/scripts/ras.sh: line 4: echo: write error: Broken pipe
/usr/share/cacti/site/scripts/ras.sh: line 6: echo: write error: Broken pipe
thx