#!/usr/bin/perl
#
# Sample Xymon status update generator
#
# (C) Copyright 2009 Rune B. Broberg
# All rights reserved
#
# This software is not for public consumption until further notice.
#

my @hosts    = ("ds1","ds2","host1","host2","host3","host4","host5","hel");
my @services = ("ldap", "http", "cpu", "msgs","load","processes");
my @statuses = ("green","green","green","green","green","green","green","yellow","red","yellow","blue","purple");

$| = 1; # Autoflush

while() {
    sleep(rand(90));

    my $host = $hosts[int(rand($#hosts+1))];
    my $service = $services[int(rand($#services+1))];
    my $status  = $statuses[int(rand($#statuses+1))];
    my $time = time;

    print "\@\@status|$time|||$host|$service||$status|||||||\n";
    print "Full text goes here\n";
    print "\@\@\n";
}
