There is written in the documentation that MRTG can write graphics based on output from external scripts instead of SNMP. 4 lines are needed as output:
current state of the first variable, normally 'incoming bytes count'
current state of the second variable, normally 'outgoing bytes count'
string (in any human readable format), telling the uptime of the target.
string, telling the name of the target.
So I made the following script (/root/mrtg-test) and chmoded it +x:
It returns 4 lines of output, but nothing is drawn on the graphs after running mrtg on that config:
Title[test]: Am testovo nekvo takova
Max In: 0.0 B/s (0.0%) Average In: 0.0 B/s (0.0%) Current In: 0.0 B/s (0.0%)
Max Out: 0.0 B/s (0.0%) Average Out: 0.0 B/s (0.0%) Current Out: 0.0 B/s (0.0%)
IMHO, there should be 3027162 current value, but it is 0. Does anyone have an idea?