Snert . Com mod_watch.pl
      from   Snert . Com

An MRTG Target Interface Script

- apache2mrtg.pl - mod_watch - mod_watch.pl -
- Welcome - Software -

Syntax

mod_watch.pl [-f in,out] url

-f in,out Pair of fields returned for In & Out values. Defaults are ifInOctets & ifOutOctets. Possible fields are:
Name     Type     Description
ifInOctetsCounter32bytes received from POST requests
ifOutOctetsCounter32bytes sent in response to requests
ifRequestsCounter32number of requests (raw hits) received
ifDocumentsCounter32number of documents sent
urlThe database key to get or set a value.

Description

Fetch the current counters associated with the given URL. The URL refers to either a virtual host, file owner, or the SERVER. For example:

http://www.snert.com/watch-info
http://www.snert.com/~achowe/watch-info
http://www.snert.com/~SERVER/watch-info

The mod_watch handler "watch-info" returns a line of plain text containing the following space separated fields:

ifName ifUptime ifInOctets ifOutOctets ifRequests ifDocuments

The script then returns output suitable for MRTG's target script command directive: line with the input bytes, line with the output bytes, line with the web server uptime, and the target name.

License

  1. Non-commercial redistribution and use of the original source distribution, without modification, is permitted provided you retain this notice, the author's copyright notice, and the disclaimer.

  2. Commercial use, in the role of "end-user" for internal business operations, of the original source distribution, without modification, is permitted provided you retain this notice, the author's copyright notice above, and the disclaimer below.

  3. Commercial redistribution (including but not limited to bundling, collections, resale) of the original source distribution and/or derived binaries, with or without modification, is permitted with a) the prior written permission from the author, b) financial remuneration to the author, c) the above copyright notice is retained and reproduced by the binary, and d) the disclaimer below appears in the documentation and/or other materials provided with the distribution.

Disclaimer

THIS SOFTWARE IS PROVIDE "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO WAY SHALL THE AUTHOR OR LICENSEE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Support

Support is only provided for the author's original source distribution and with some small financial remuneration per incident to the author. Free support is no longer provided. [In other words, if you need help offer me some money or a gift (see my wishlist at Amazon), as my free time outside of my normal day job is limited.]


- apache2mrtg.pl - mod_watch - mod_watch.pl -
- Welcome - Software -