NAME

Xymon::Server::History - Return a hash of Xymon events history

SYNOPSIS

use Xymon::Server::History;

my $history = Xymon::Server::History->new({HOME=>'/home/hobbit'})

DESCRIPTION

Various methods for returning differents views of the event data stored in $HOBBITHOME/data/histlogs/

METHODS

new({...})

Instantiates the object.

You must pass it the HOME dir for hobbit. (One level below server).

new({HOME=>'/home/hobbit'})

allEvents({....})

Returns a hash of events with following structure:

{
	server1 => {
				conn => {
					"file1"=>{
						filename => "fullfilename"
						time => "time in unix format"
					}
					"file2" => {
						filename => "fullfilename"
						time => "time in unix format"
					}
			  },

	server2 => {
				uptime => "file1"=>{
						filename => "fullfilename"
						time => "time in unix format"
					}
					"file2" => {
						filename => "fullfilename"
						time => "time in unix format"
					}
			  }
}

allEvents() will return events for all servers and tests. This may be filter by passing an array of servers, and an array of tests in order to filter the results eg:

allEvents({
	SERVERS => ["servername1","servername2"],
	TESTS => ["conn","uptime"]
})

The filename of the event is in the format: Fri_Dec_14_16:56:14_2007

outagelist({...})

outagelist({
	SERVERS => ["servername1","servername2"],
	TESTS => ["conn","uptime"]
})

Returns a list of outages from red to non-red in the following format

{
	starttime => {
		server => "servername"
		test => "testname"
		eventend => "time"
	}
}

AUTHOR

David Peters
CPAN ID: DAVIDP
davidp@electronf.com
http://www.electronf.com

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1).