Remstats Home


  About remstats
  Release Notes
  FAQ
  Conventions
  Prerequisites
  Installation
  Configuration
  Configuration Tools
  Servers
  Collectors
      cisco-access-server-collector
      dbi-collector
      dns-collector
      error-collector
      log-collector
      nt-status-collector
      ntop-collector
      ping-collector
      port-collector
      program-collector
      remoteping-collector
      snmp-collector
      snmp-route-collector
      unix-status-collector
  Updater
  Monitors
  pagemakers
  run-remstats2
  CGIs
  troubleshooting
  do-traceroutes
  Miscellany
  Thank-you
  Index


Live Data

Remstats was written by Thomas Erskine at the CRC in Canada and now looking for work.

[Top] [Prev] [Next]

port-collector - get service status

Usage:

port-collector version 1.26 from remstats 1.0.13a
usage: ../port-collector [options]
where options are:
    -d nnn  enable debugging output at level 'nnn'
    -f fff  use 'fff' for config-dir [/home/groups/r/re/remstats/etc/config]
    -F      force collection even if it is not time
    -G GGG  only try hosts from group 'GGG', a comma-separated list
    -h      show this help
    -H HHH  only try hosts from 'HHH', a comma-separated list
    -t ttt  set default timeout to 'ttt' [5]
    -K KKK  only try hosts with key(s) 'KKK', a comma-separated list
    -u      ignore uphosts file

Description:

The port-collector gets data about services running on specified TCP ports. It will attempt to connect to the specified port on the host, and optionally send a string to it. It will then examine the response, if any, for certain patterns. This permits it to query almost any text-based protocol. For information on how to set up a new service, look in the scripts directory in the configuration directory.

The rrd specification can also override the port specified by the script, by appending a colon and the port-number. E.G. for a web-server on port 8000, you could specify the rrd like:

	rrd port-http:8000

According to whether it can connect to the service and what response it gets back, it sets a status to one of OK, WARN, ERROR, CRITICAL. These are arbitrary levels, except that OK means normal, and their meanings are determined by the configuration file. The port-collector will also log how long it took the service to respond. These numbers are not intended for benchmarking, but only for determining the health of the service.

Returned Data

The variables returned by the port-collector are:

	port-PORTNAME - containing the status of the port, calculated by 
		the script for this port
	port-PORTNAME-response - containing the response-time for the query

Other data from the port-collector

The main RRD for the port-collector is port-*, but it is possible to define other RRDs. If you want to collect information from the results elicited by the send string, you can provide either or both of the infopattern or valuepattern in the script associated with the RRD. The script must be named the same as the rrd. Look in the scripts configfile docs for details on scripts.

A matching valuepattern will cause the port-collector to return variables named RRDNAME:value# with "#" replaced by a single digit, corresponding to the number of the parenthesized part of the pattern that was matched.

A matching infopattern will cause the port-collector to create status files for this host called INFO1-RRDNAME. None of the existing pagemakers use these status files, but the view-writer could do so if a view template refered to them.


[Top] [Remstats] [SourceWorks] [RRDtool] [SourceForge]
Last updated Fri May 30 13:51:04 PDT 2003 by <terskine@users.sourceforge.net>.