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

This source distribution is made freely available and there is no charge for its use, provided you retain this notice, disclaimers, author's copyright, and credits.

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 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.


| apache2mrtg.pl | mod_watch | mod_watch.pl |
| Welcome | Software |