[mrtg] MRTG Data Collection Plug-in

Steve Shipway s.shipway at auckland.ac.nz
Mon Oct 20 06:31:12 CEST 2008


>1. The exit status of zero is referred to my C++ program? As the following:
>    int main(){ ... return 0}

Yes.  Or, more precisely,
    int main() { ... exit(0); }

>2. Should I declare the 4 lines of output in my script? If so, how?

Yes.  For example:

    double vara, varb;
    /* set vara and varb to the two values for your script to output */
    printf( "%f\n%f\n\nMy script description\n",vara, varb );
    exit(0);

The third line would contain a human-readble uptime string, and the fourth a device description; if you use RRDtool mode, though, they are not used.  However they must exist, even if blank.

Steve



More information about the mrtg mailing list