20 lines
635 B
Bash
Executable File
20 lines
635 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "WorkDir: /var/www/mrtg/rrd"
|
|
echo "LogFormat: rrdtool"
|
|
|
|
curl -s http://10.3.0.1 | while read c;
|
|
do
|
|
echo "# $c"
|
|
echo "Target[lxc-$c.cpu]: \`curl -s http://10.3.0.1/$c/CPU; echo 0\`"
|
|
echo "Title[lxc-$c.cpu]: [CPU] $c"
|
|
echo "MaxBytes[lxc-$c.cpu]: 42949672950000000"
|
|
echo "Target[lxc-$c.memory]: \`curl -s http://10.3.0.1/$c/Memory; echo 0\`"
|
|
echo "Title[lxc-$c.memory]: [Memory] $c"
|
|
echo "MaxBytes[lxc-$c.memory]: 42949672950000000"
|
|
echo "Target[lxc-$c.net]: \`curl -s http://10.3.0.1/$c/RX http://10.3.0.1/$c/TX\`"
|
|
echo "Title[lxc-$c.net]: [Net] $c"
|
|
echo "MaxBytes[lxc-$c.net]: 42949672950000000"
|
|
echo ""
|
|
done
|