Transports are tiny scripts sending a measured quantity from standard input. They are specific to MRTG Online protocols.
Different tools and languages can be used for writing transports, and there are little to no tool standardization. So we implement transports for every tool able to send data over network.
HTTP Transport
- wget
-
read VALUE ; wget -q --post-data="value=$VALUE" \ -O /dev/null -S "http://mrtg.prcn.co.cc/u/$1"
- fetch (popular on xBSD)
-
read VALUE ; fetch "http://mrtg.prcn.co.cc/u/$1?value=$VALUE"
Note that fetch cannot send POST requests so we have to use GET and violate REST principles to make updating graphs with fetch possible.