Clean contrib/.

fixes #4774
This commit is contained in:
Michael Friedrich 2013-10-03 20:36:44 +02:00
parent d79680c642
commit d2d6653236
25 changed files with 22 additions and 26814 deletions

1
.gitignore vendored
View File

@ -30,6 +30,7 @@ depcomp
icinga-version.h
install-sh
libtool
libtool.old
ltdl
ltmain.sh
missing

View File

@ -1,116 +0,0 @@
<?php
class IcingaConnection
{
private $_streamContext;
private $_stream;
private $_subscriptions;
private $_publications;
public function __construct()
{
$this->_subscriptions = array();
$this->_publications = array();
}
public function Connect($host, $port, $cafile, $cert)
{
$this->_streamContext = stream_context_create();
stream_context_set_option($this->_streamContext, 'ssl', 'cafile', $cafile);
stream_context_set_option($this->_streamContext, 'ssl', 'local_cert', $cert);
$this->_stream = stream_socket_client('ssl://' . $host . ':' . $port, $error, $errorString, 60, STREAM_CLIENT_CONNECT, $this->_streamContext);
if ($this->_stream === false)
return false;
$this->Publish('discovery::RegisterComponent');
$this->Publish('discovery::Welcome');
$this->Subscribe('discovery::NewComponent');
$this->Subscribe('discovery::RegisterComponent');
$this->Subscribe('discovery::Welcome');
$params = array(
'publications' => $this->_publications,
'subscriptions' => $this->_subscriptions
);
$this->SendMessage('discovery::RegisterComponent', $params);
$this->SendMessage('discovery::Welcome');
}
public function Subscribe($topic)
{
$this->_subscriptions[] = $topic;
}
public function Publish($topic)
{
$this->_publications[] = $topic;
}
public function SendMessage($topic, $params = array())
{
$message = array('jsonrpc' => '2.0', 'method' => $topic, 'params' => $params);
$messageStr = json_encode($message, JSON_FORCE_OBJECT);
fprintf($this->_stream, '%d:%s,', strlen($messageStr), $messageStr);
fflush($this->_stream);
}
public function ReadMessage()
{
$lenStr = '';
/* read netstring length (up until the first :) */
while (($chr = fread($this->_stream, 1)) != ':') {
if ($chr === false)
return false;
$lenStr .= $chr;
}
/* read data */
$messageStr = fread($this->_stream, (int)$lenStr);
if ($messageStr === false)
return false;
/* read trailing comma */
$comma = fread($this->_stream, 1);
if ($comma != ',')
return false;
return json_decode($messageStr, true);
}
}
$icinga = new IcingaConnection();
$icinga->Subscribe('delegation::ServiceStatus');
if ($icinga->Connect('localhost', 7777, 'ca.crt', 'icinga-c3.pem') === false)
return;
while (($message = $icinga->ReadMessage()) !== false) {
if ($message['method'] != 'delegation::ServiceStatus')
continue;
$params = $message['params'];
$now = time();
$next = $params['next_check'] - $now;
$states = array('ok', 'warning', 'critical', 'uncheckable', 'unknown');
$types = array('hard', 'soft');
echo 'Service: ' . $params['service'] .
', State: ' . $states[$params['state']] .
', State Type: ' . $types[$params['state_type']] .
', Attempt: ' . $params['current_attempt'] .
' (took ' . ($params['result']['schedule_end'] - $params['result']['schedule_start']) . ' seconds' .
', next check in ' . $next . ' seconds)' .
"\n";
}
?>

View File

@ -1,10 +0,0 @@
#include <stdio.h>
int main(int argc, char **argv)
{
printf("check_random | test=1\n");
srand(getpid());
return rand() % 4;
}

View File

@ -1,51 +0,0 @@
#!/bin/bash
CONFFILE="many.conf"
NUMBERHOSTSVC=100
NUMBERHOST=10
rm -f $CONFFILE
cat >> $CONFFILE << EOF
/* Icinga 2 Generated Test Config */
include <itl/itl.conf>
include <itl/standalone.conf>
object IcingaApplication "icinga" {
macros = {
plugindir = "/usr/lib/nagios/plugins"
}
}
library "compat"
object CompatComponent "compat" { }
object CompatLog "compat-log" { }
/*
library "livestatus"
object LivestatusComponent "livestatus" {}
*/
object CheckCommand "check_dummy" inherits "plugin-check-command" {
command = "\$plugindir$/check_dummy 1 \"icinga2 test\"",
}
template Service "dummy-service-tmpl" {
check_command = "check_dummy",
check_interval = 1m,
}
EOF
# host template with services
echo 'template Host "dummy-host-tmpl" {' >> $CONFFILE
for i in $(seq 1 $NUMBERHOSTSVC)
do echo ' services["icinga2_service'$i'"] = { templates = [ "dummy-service-tmpl" ] },' >> $CONFFILE
done
echo ' hostcheck = "icinga2_service1",' >> $CONFFILE
echo '}' >> $CONFFILE
# hosts
for i in $(seq 1 $NUMBERHOST)
do echo 'object Host "icinga2_host'$i'" inherits "dummy-host-tmpl" { }' >> $CONFFILE
done

View File

@ -1,5 +0,0 @@
This directory contains sample and test configuration
for Icinga 2 by MF (Michael Friedrich, dnsmichi).
May be changed or not work, and later deleted once general
test config is sorted.

View File

@ -1,291 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
include <itl/itl.conf>
include <itl/standalone.conf>
set IcingaMacros = {
plugindir = "/usr/lib/nagios/plugins",
iconimagedir = "/icinga2/images/icons",
icinga2src = "/home/michi/coding/icinga/icinga2",
}
set Icinga2Prefix = "/home/michi/i2"
set PerfdataPrefix = "/data/icinga2"
/**
* Enable Syslogger
*/
/*
object SyslogLogger "icinga2-syslog" {
severity = "information"
}
object FileLogger "my-debug-file" {
severity = "debug",
path = (Icinga2Prefix + "/var/log/icinga2/icinga2-debug.log")
}
*/
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
library "compat"
object StatusDataWriter "status" { }
object ExternalCommandListener "command" { }
object CompatLogger "compat-log" { }
/**
* INGRAPH
*/
object PerfdataWriter "pnp" {
perfdata_path = (PerfdataPrefix + "/perfdata/service-perfdata"),
format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$",
rotation_interval = 15s,
}
/**
* LIVESTATUS
*/
library "livestatus"
object LivestatusListener "livestatus-tcp" {
socket_type = "tcp",
bind_host = "127.0.0.1",
bind_port = "6558"
}
object LivestatusListener "livestatus-unix" {
socket_type = "unix",
socket_path = (Icinga2Prefix + "/var/run/icinga2/cmd/livestatus")
}
/**
* IDO
*/
library "db_ido_mysql"
object IdoMysqlConnection "ido-mysql" {
host = "127.0.0.1",
port = "3306",
user = "icinga",
password = "icinga",
database = "icinga",
table_prefix = "icinga_",
instance_name = "icinga2",
instance_description = "icinga2 dev instance"
}
/**
* And finally we define some host that should be checked.
*/
set bumsti = 60
template Service "notification-tmpl" {
notifications["mail-michi"] = {
templates = [ "mail-notification" ],
users = [ "michi" ],
},
}
template Service "flapper" inherits "ping4" {
notifications["mail-michi"] = {
templates = [ "mail-notification" ],
users = [ "michi" ],
},
check_command = "flapme",
enable_flapping = 1,
flapping_threshold = 20,
check_interval = 15s,
custom = {
"foo1" = "bar1",
"foo5" = "bar5"
},
groups = [ "sg-thruk" ],
}
object Host "dummy01" {
groups = [ "hg-thruk" ],
services["flapme"] = {
templates = [ "flapper" ],
check_command = "flapme",
},
}
object Host "localhost" {
host_dependencies = [ "dummy01" ],
services["flapme"] = {
templates = [ "flapper" ],
notifications["mail-michi"] = {
templates = [ "mail-notification" ],
users = [ "michi" ],
user_groups = [ "all-michis" ],
notification_period = "24x7",
notification_state_filter = (StateFilterUnknown | StateFilterOK | StateFilterWarning | StateFilterCritical),
notification_type_filter = (NotificationRecovery | NotificationDowntimeStart | NotificationDowntimeEnd),
},
check_command = "flapme",
enable_flapping = 1,
flapping_threshold = 20,
check_interval = 15s,
custom += {
"foo1" = "bar1",
"foo2" = "bar2",
"notes" = "flapping test $SERVICEATTEMPT$ / $MAXSERVICEATTEMPT$",
"notes_url" = "https://www.icinga.org/$HOSTNAME$/$SERVICEDESC$/$TIMET$",
"action_url" = "https://dev.icinga.org/$HOSTADDRESS$/$SERVICESTATE$",
"icon_image" = "$iconimagedir$/icinga2.png",
"icon_image_alt" = "custom attr macro expand test"
},
groups = [ "sg-thruk" ],
},
services["ping4"] = {
templates = [ "ping4", "notification-tmpl" ],
},
services["ping6"] = {
templates = [ "ping6", "notification-tmpl" ],
},
services["ssh"] = {
templates = [ "ssh", "notification-tmpl" ],
},
services["load"] = {
templates = [ "load", "notification-tmpl" ],
},
services["users"] = {
templates = [ "users", "notification-tmpl" ],
groups = [ "sg-thruk" ],
service_dependencies = [
{ host = "dummy01", service = "flapme" },
],
},
macros = {
address = "127.0.0.1",
address6 = "::1",
},
custom += {
"fooh1" = "barh1",
"fooh2" = "barh2",
"notes" = "host test $SERVICEATTEMPT$ / $MAXSERVICEATTEMPT$", /* this should work with hostcheck set */
"notes_url" = "https://www.icinga.org/$HOSTNAME$/$SERVICEDESC$/$TIMET$",
"action_url" = "https://dev.icinga.org/$HOSTADDRESS$/$SERVICESTATE$",
"icon_image" = "$iconimagedir$/icinga2.png",
"icon_image_alt" = "custom attr macro expand test",
"2d_coords" = "42,1337"
},
check = "flapme",
groups = [ "hg-thruk" ],
}
object HostGroup "hg-thruk" {
display_name = "hg thruk livestatus",
custom = {
action_url = "http://www.icinga.org/about/icinga2",
notes_url = "http://docs.icinga.org/latest/en",
notes = "This is the icinga2 livestatus test"
}
}
object ServiceGroup "sg-thruk" {
display_name = "sg thruk livestatus",
custom = {
action_url = "http://www.icinga.org/about/icinga2",
notes_url = "http://docs.icinga.org/latest/en",
notes = "This is the icinga2 livestatus test"
}
}
object CheckCommand "flapme" inherits "plugin-check-command" {
command = "$icinga2src$/contrib/flap.sh",
}
object EventCommand "eventme" inherits "plugin-event-command" {
command = "echo \"event fired\"",
}
object NotificationCommand "notifyme" inherits "plugin-notification-command" {
command = "echo \"hello\"",
}
object NotificationCommand "mail" inherits "plugin-notification-command" {
command = "echo `date +%s` >> /tmp/i2.notify"
}
object User "michi-clone" {
groups = [ "all-michis" ],
}
object User "michi" {
groups = [ "all-michis" ],
notification_state_filter = (StateFilterUnknown | StateFilterOK | StateFilterWarning | StateFilterCritical),
enable_notifications = 1,
notification_period = "24x7",
macros = {
"name" = "bumsti",
"pager" = "keks@kekse.de",
"email" = "michael.friedrich@icinga.org",
},
custom = {
"cv_key01" = "cv_val01",
"cv_key03" = "cv_val03",
"cv_key07" = "cv_val07",
}
}
object UserGroup "all-michis" {
display_name = "all my michis",
}
template Notification "mail-notification" {
notification_command = "mail",
}
object TimePeriod "8x5" inherits "legacy-timeperiod" {
display_name = "icinga 2 8x5",
ranges = {
"monday" = "09:00-17:00",
"tuesday" = "09:00-17:00",
"wednesday" = "09:00-17:00",
"thursday" = "09:00-17:00",
"friday" = "09:00-17:00",
}
}
object TimePeriod "24x7" inherits "legacy-timeperiod" {
display_name = "icinga 2 24x7",
ranges = {
"monday" = "00:00-24:00",
"tuesday" = "00:00-24:00",
"wednesday" = "00:00-24:00",
"thursday" = "00:00-24:00",
"friday" = "00:00-24:00",
"saturday" = "00:00-24:00",
"sunday" = "00:00-24:00",
}
}
object TimePeriod "none" inherits "legacy-timeperiod" {
display_name = "icinga 2 none",
ranges = {
}
}

View File

@ -1,14 +0,0 @@
Icinga2 Demo Configuration Files
================================
This contains various config samples from the demo Team Icinga
did during the presentation at OSMC 2012.
http://www.slideshare.net/icinga/icinga-at-osmc-2012
You can use them to play around with the initial first release 0.0.1
of Icinga2 but remember that it might change later on, so this is
just kept for demo purposes.
For a more recent documentation on the configuration format please
check docs/ as well as the Icinga wiki at
https://wiki.icinga.org/display/icinga2

View File

@ -1,17 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICnjCCAgegAwIBAgIJAOP3gULX9+xgMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNV
BAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMRIwEAYDVQQHDAlOdXJlbWJlcmcxFTAT
BgNVBAoMDE5FVFdBWVMgR21iSDEcMBoGA1UEAwwTSWNpbmdhIFNuYWtlIE9pbCBD
QTAeFw0xMjA0MjQxMTQyMzFaFw0yMjA0MjIxMTQyMzFaMGgxCzAJBgNVBAYTAkRF
MRAwDgYDVQQIDAdCYXZhcmlhMRIwEAYDVQQHDAlOdXJlbWJlcmcxFTATBgNVBAoM
DE5FVFdBWVMgR21iSDEcMBoGA1UEAwwTSWNpbmdhIFNuYW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4PYjjxlW7T/QvqkZb4tbyyeE
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQChX/lJAoGzbRD9DqHhfitNi+UkZapJJKenmonodCDezTQMXhC3
BqWZsnL+LB6d9Kr9Mw7SlNR2K6ZvExAbM9gKE/id+kE/SMrH3FnTPaN1mRjA1Fam
AVLHLq5MQUCQinBcF4o0yfA45/NsVYDVJvxOOAHW6yMFJcdt8pZRK8fIXwIDAQAB
AoGASJwWXnNySHlam4Jp9DwA3/OCNs5HwIFtrkwqoR0fbSCHusjYXIHxISbZ9uOD
Iy9jgGno0XeF4WXijTfWl2bMXYWTS7ISMBg96bPZtG/RTdgd1LT69s82a+apbgSd
bxB64cyn8KtuABfZ9AMR+TV28TDmnGMdhVoaM66iWKv4a4ECQQDNmk3NTZ+s/y5F
5qOgJqH5yX1hZLLmm8e8lpghqDT43HR3cMJLN6b5oS1UdMcEw1Q6q3hjFl+MbnZa
AzvzpT9DAkEAyO5YdpbRG1OR7sNmidowvr1NkIjV/C4UuSpGrx9XJFAZkLxEEmMu
13QssdHjAkX5yFjkoNPC+wA6DeVjtvHatQJBAMG1qavOgKyLV9t/65XOEDm5Pqnu
KCfhiZQDBp5fTllRy2FlGYmoi2cSFhVGWOQB7G/CchBZWfiDcnpoJanufOUCQGr7
bKKHnoKcNmEYLOpNABMum7PPB5AjwOjt94CagT1WYKZNdzkLEg+pTXrIM8QsGdhw
bBqtZW1bK43mivcHQtkCQF+p7LfzmPo9uzRrOfjgTDYLuh3MD8EKNs0M6l15UqbQ
nfBBE0oIPH4j+K++7xWUQ7vbiyBc7C7H3NZeE6xqfS0=
-----END RSA PRIVATE KEY-----

View File

@ -1,186 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
/**
* Global configuration settings
*/
local object IcingaApplication "icinga" {
pid_path = "./var/run/icinga2.pid",
state_path = "./var/lib/icinga2/icinga2.state",
macros = {
plugindir = "/usr/lib/icinga/plugins"
}
}
/**
* Advanced logging settings
*/
local object Logger "my-debug-log" {
type = "console",
severity = "information"
}
/**
* The checker component takes care of executing service checks.
*/
local object Component "checker" {
}
/**
* The delegation component assigns services to checkers. You need to load
* this component even if your Icinga setup only consists of a single instance.
*/
local object Component "delegation" {
}
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
local object Component "compat" {
status_path = "/dev/shm/status.dat",
objects_path = "/dev/shm/objects.cache",
}
/**
* The compatido component works as idomod connector to a running ido2db
* daemon, connected via tcp socket only. It will dump config and status
* information periodically for now. By default, this remains disabled.
*/
/*
local object Component "compatido" {
socket_address = "127.0.0.1",
socket_port = "5668",
instance_name = "i2-default",
reconnect_interval = 15,
}
*/
/**
* This template defines some basic parameters for services that use
* external plugins for their checks.
*/
template Service "icinga-service" {
methods = {
check = "PluginCheck"
}
}
/**
* The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
/**
* ping
*/
template Service "ping4" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* ping6
*/
template Service "ping6" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* http
*/
template Service "http" inherits "icinga-service" {
check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
}
/**
* ssh
*/
template Service "ssh" inherits "icinga-service" {
check_command = "$plugindir$/check_ssh '$address$'",
}
/**
* local checks
*/
template Service "disk space" inherits "icinga-service" {
check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
macros += {
wfree = "20%",
cfree = "10%",
}
}
template Service "current users" inherits "icinga-service" {
check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 20,
cgreater = 50,
}
}
template Service "total processes" inherits "icinga-service" {
check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 250,
cgreater = 400,
}
}
template Service "current load" inherits "icinga-service" {
check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
macros += {
wload1 = 5.0,
wload5 = 4.0,
wload15 = 3.0,
cload1 = 10.0,
cload5 = 6.0,
cload15 = 4.0,
}
}
/**
* demo check
*/
template Service "demo" inherits "icinga-service" {
check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
}
/**
* And finally we define some host that should be checked.
*/
object Host "localhost" {
services = {
"ping4", "ping6",
"http", "ssh",
"current load", "total processes",
"current users", "disk space",
"demo"
},
macros = {
address = "127.0.0.1",
address6 = "::1"
},
check_interval = 1m
}

View File

@ -1,202 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
/**
* Global configuration settings
*/
local object IcingaApplication "icinga" {
pid_path = "./var/run/icinga2.pid",
state_path = "./var/lib/icinga2/icinga2.state",
macros = {
plugindir = "/usr/lib/icinga/plugins"
}
}
/**
* Advanced logging settings
*/
local object Logger "my-debug-log" {
type = "console",
severity = "information"
}
/**
* The checker component takes care of executing service checks.
*/
local object Component "checker" {
}
/**
* The delegation component assigns services to checkers. You need to load
* this component even if your Icinga setup only consists of a single instance.
*/
local object Component "delegation" {
}
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
local object Component "compat" {
status_path = "/dev/shm/status.dat",
objects_path = "/dev/shm/objects.cache",
}
/**
* The compatido component works as idomod connector to a running ido2db
* daemon, connected via tcp socket only. It will dump config and status
* information periodically for now. By default, this remains disabled.
*/
/*
local object Component "compatido" {
socket_address = "127.0.0.1",
socket_port = "5668",
instance_name = "i2-default",
reconnect_interval = 15,
}
*/
/**
* This template defines some basic parameters for services that use
* external plugins for their checks.
*/
template Service "icinga-service" {
methods = {
check = "PluginCheck"
}
}
/**
* The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
/**
* ping
*/
template Service "ping4" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* ping6
*/
template Service "ping6" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* http
*/
template Service "http" inherits "icinga-service" {
check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
}
/**
* ssh
*/
template Service "ssh" inherits "icinga-service" {
check_command = "$plugindir$/check_ssh '$address$'",
}
/**
* local checks
*/
template Service "disk space" inherits "icinga-service" {
check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
macros += {
wfree = "20%",
cfree = "10%",
}
}
template Service "current users" inherits "icinga-service" {
check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 20,
cgreater = 50,
}
}
template Service "total processes" inherits "icinga-service" {
check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 250,
cgreater = 400,
}
}
template Service "current load" inherits "icinga-service" {
check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
macros += {
wload1 = 5.0,
wload5 = 4.0,
wload15 = 3.0,
cload1 = 10.0,
cload5 = 6.0,
cload15 = 4.0,
}
}
/**
* demo check
*/
template Service "demo" inherits "icinga-service" {
check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
}
/**
* And finally we define some host that should be checked.
*/
object Host "localhost" {
services = {
"ping4", "ping6",
"http", "ssh",
"current load", "total processes",
"current users", "disk space",
"demo"
},
macros = {
address = "127.0.0.1",
address6 = "::1"
},
check_interval = 1m
}
/**
* Host with dependant hostchecks
*/
object Host "www.icinga.org" {
services = {
"ping4", "ping6",
"http", "ssh",
"demo",
},
macros = {
address = "www.icinga.org",
},
hostchecks = {"http", "ping6"},
check_interval = 15s
}

View File

@ -1,195 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
/**
* Global configuration settings
*/
local object IcingaApplication "icinga" {
pid_path = "./var/run/icinga2.pid",
state_path = "./var/lib/icinga2/icinga2.state",
macros = {
plugindir = "/usr/lib/icinga/plugins"
}
}
/**
* Advanced logging settings
*/
local object Logger "my-debug-log" {
type = "console",
severity = "information"
}
/**
* The checker component takes care of executing service checks.
*/
local object Component "checker" {
}
/**
* The delegation component assigns services to checkers. You need to load
* this component even if your Icinga setup only consists of a single instance.
*/
local object Component "delegation" {
}
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
local object Component "compat" {
status_path = "/dev/shm/status.dat",
objects_path = "/dev/shm/objects.cache",
}
/**
* The compatido component works as idomod connector to a running ido2db
* daemon, connected via tcp socket only. It will dump config and status
* information periodically for now. By default, this remains disabled.
*/
/*
local object Component "compatido" {
socket_address = "127.0.0.1",
socket_port = "5668",
instance_name = "i2-default",
reconnect_interval = 15,
}
*/
/**
* This template defines some basic parameters for services that use
* external plugins for their checks.
*/
template Service "icinga-service" {
methods = {
check = "PluginCheck"
}
}
/**
* The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
/**
* ping
*/
template Service "ping4" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* ping6
*/
template Service "ping6" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* http
*/
template Service "http" inherits "icinga-service" {
check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
}
/**
* ssh
*/
template Service "ssh" inherits "icinga-service" {
check_command = "$plugindir$/check_ssh '$address$'",
}
/**
* local checks
*/
template Service "disk space" inherits "icinga-service" {
check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
macros += {
wfree = "20%",
cfree = "10%",
}
}
template Service "current users" inherits "icinga-service" {
check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 20,
cgreater = 50,
}
}
template Service "total processes" inherits "icinga-service" {
check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 250,
cgreater = 400,
}
}
template Service "current load" inherits "icinga-service" {
check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
macros += {
wload1 = 5.0,
wload5 = 4.0,
wload15 = 3.0,
cload1 = 10.0,
cload5 = 6.0,
cload15 = 4.0,
}
}
/**
* demo check
*/
template Service "demo" inherits "icinga-service" {
check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
}
/**
* And finally we define some host that should be checked.
*/
object Host "localhost" {
services = {
"ping4", "ping6",
"http", "ssh",
"current load", "total processes",
"current users", "disk space",
"demo"
},
hostgroups += {"demogroup1", "demogroup2"},
macros = {
address = "127.0.0.1",
address6 = "::1"
},
check_interval = 1m
}
object HostGroup "demogroup1" {
alias = "Hostgroup Demo Number 1"
}
object HostGroup "demogroup2" {
alias = "Hostgroup Demo Number 2"
}

View File

@ -1,217 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
/**
* Global configuration settings
*/
local object IcingaApplication "icinga" {
pid_path = "./var/run/icinga2.pid",
state_path = "./var/lib/icinga2/icinga2.state",
macros = {
plugindir = "/usr/lib/icinga/plugins"
}
}
/**
* Advanced logging settings
*/
local object Logger "my-debug-log" {
type = "console",
severity = "information"
}
/**
* The checker component takes care of executing service checks.
*/
local object Component "checker" {
}
/**
* The delegation component assigns services to checkers. You need to load
* this component even if your Icinga setup only consists of a single instance.
*/
local object Component "delegation" {
}
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
local object Component "compat" {
status_path = "/dev/shm/status.dat",
objects_path = "/dev/shm/objects.cache",
}
/**
* The compatido component works as idomod connector to a running ido2db
* daemon, connected via tcp socket only. It will dump config and status
* information periodically for now. By default, this remains disabled.
*/
/*
local object Component "compatido" {
socket_address = "127.0.0.1",
socket_port = "5668",
instance_name = "i2-default",
reconnect_interval = 15,
}
*/
/**
* This template defines some basic parameters for services that use
* external plugins for their checks.
*/
template Service "icinga-service" {
methods = {
check = "PluginCheck"
}
}
/**
* The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
/**
* ping
*/
template Service "ping4" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* ping6
*/
template Service "ping6" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* http
*/
template Service "http" inherits "icinga-service" {
check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
}
/**
* ssh
*/
template Service "ssh" inherits "icinga-service" {
check_command = "$plugindir$/check_ssh '$address$'",
}
/**
* local checks
*/
template Service "disk space" inherits "icinga-service" {
check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
macros += {
wfree = "20%",
cfree = "10%",
}
}
template Service "current users" inherits "icinga-service" {
check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 20,
cgreater = 50,
}
}
template Service "total processes" inherits "icinga-service" {
check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 250,
cgreater = 400,
}
}
template Service "current load" inherits "icinga-service" {
check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
macros += {
wload1 = 5.0,
wload5 = 4.0,
wload15 = 3.0,
cload1 = 10.0,
cload5 = 6.0,
cload15 = 4.0,
}
}
/**
* demo check
*/
template Service "demo" inherits "icinga-service" {
check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
}
/**
* And finally we define some host that should be checked.
*/
object Host "localhost" {
services = {
"ping4", "ping6",
"http", "ssh",
"current load", "total processes",
"current users", "disk space",
"demo"
},
hostgroups += {"demogroup1", "demogroup2"},
macros = {
address = "127.0.0.1",
address6 = "::1"
},
check_interval = 1m
}
object HostGroup "demogroup1" {
alias = "Hostgroup Demo Number 1"
}
object HostGroup "demogroup2" {
alias = "Hostgroup Demo Number 2"
}
template Host "http-host" {
services = {
"ping4", "http"
},
hostgroups = {"demo1", "demo2"},
check_interval = 1m
}
object Host "www.google.de" inherits "http-host" {
macros = {
address = "www.google.de",
address6 = "::1"
}
}
object Host "www.gmx.de" inherits "http-host" {
macros = {
address = "www.gmx.de",
address6 = "::1"
},
}

View File

@ -1,192 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
/**
* Global configuration settings
*/
local object IcingaApplication "icinga" {
pid_path = "./var/run/icinga2.pid",
state_path = "./var/lib/icinga2/icinga2.state",
cert_path = "./etc/icinga2/icinga-c1.pem",
ca_path = "./etc/icinga2/ca.crt",
node = "192.168.56.101",
service = 7777,
macros = {
plugindir = "/usr/lib/icinga/plugins"
}
}
/**
* Advanced logging settings
*/
local object Logger "my-debug-log" {
type = "console",
severity = "information"
}
/**
* The checker component takes care of executing service checks.
*/
local object Component "checker" {
}
/**
* The delegation component assigns services to checkers. You need to load
* this component even if your Icinga setup only consists of a single instance.
*/
local object Component "delegation" {
}
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
local object Component "compat" {
status_path = "/dev/shm/status.dat",
objects_path = "/dev/shm/objects.cache",
}
/**
* The compatido component works as idomod connector to a running ido2db
* daemon, connected via tcp socket only. It will dump config and status
* information periodically for now. By default, this remains disabled.
*/
/*
local object Component "compatido" {
socket_address = "127.0.0.1",
socket_port = "5668",
instance_name = "i2-default",
reconnect_interval = 15,
}
*/
/**
* This template defines some basic parameters for services that use
* external plugins for their checks.
*/
template Service "icinga-service" {
methods = {
check = "PluginCheck"
}
}
/**
* The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
/**
* ping
*/
template Service "ping4" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* ping6
*/
template Service "ping6" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* http
*/
template Service "http" inherits "icinga-service" {
check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
}
/**
* ssh
*/
template Service "ssh" inherits "icinga-service" {
check_command = "$plugindir$/check_ssh '$address$'",
}
/**
* local checks
*/
template Service "disk space" inherits "icinga-service" {
check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
macros += {
wfree = "20%",
cfree = "10%",
}
}
template Service "current users" inherits "icinga-service" {
check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 20,
cgreater = 50,
}
}
template Service "total processes" inherits "icinga-service" {
check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 250,
cgreater = 400,
}
}
template Service "current load" inherits "icinga-service" {
check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
macros += {
wload1 = 5.0,
wload5 = 4.0,
wload15 = 3.0,
cload1 = 10.0,
cload5 = 6.0,
cload15 = 4.0,
}
}
/**
* demo check
*/
template Service "demo" inherits "icinga-service" {
check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
}
/**
* And finally we define some host that should be checked.
*/
object Host "localhost" {
services = {
"ping4", "ping6",
"http", "ssh",
"current load", "total processes",
"current users", "disk space",
"demo"
},
macros = {
address = "127.0.0.1",
address6 = "::1"
},
check_interval = 1m
}

View File

@ -1,197 +0,0 @@
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* The docs/icinga2-config.txt file in the source tarball has a detailed
* description of what configuration options are available.
*/
/**
* Global configuration settings
*/
local object IcingaApplication "icinga" {
pid_path = "./var/run/icinga2.pid",
state_path = "./var/lib/icinga2/icinga2.state",
cert_path = "./etc/icinga2/icinga-c1.pem",
ca_path = "./etc/icinga2/ca.crt",
node = "192.168.56.101",
service = 7777,
macros = {
plugindir = "/usr/lib/icinga/plugins"
}
}
/**
* Advanced logging settings
*/
local object Logger "my-debug-log" {
type = "console",
severity = "information"
}
/**
* The checker component takes care of executing service checks.
*/
local object Component "checker" {
}
/**
* The delegation component assigns services to checkers. You need to load
* this component even if your Icinga setup only consists of a single instance.
*/
local object Component "delegation" {
}
/**
* The compat component periodically updates the status.dat and objects.cache
* files. These are used by the Icinga 1.x CGIs to display the state of
* hosts and services.
*/
local object Component "compat" {
status_path = "/dev/shm/status.dat",
objects_path = "/dev/shm/objects.cache",
}
/**
* The compatido component works as idomod connector to a running ido2db
* daemon, connected via tcp socket only. It will dump config and status
* information periodically for now. By default, this remains disabled.
*/
/*
local object Component "compatido" {
socket_address = "127.0.0.1",
socket_port = "5668",
instance_name = "i2-default",
reconnect_interval = 15,
}
*/
/**
* This template defines some basic parameters for services that use
* external plugins for their checks.
*/
template Service "icinga-service" {
methods = {
check = "PluginCheck"
}
}
/**
* The service templates for checks. In an Icinga 1.x environment
* this would be defined as a check command.
*/
/**
* ping
*/
template Service "ping4" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* ping6
*/
template Service "ping6" inherits "icinga-service" {
check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
macros += {
wrta = 50,
wpl = 5,
crta = 100,
cpl = 10
}
}
/**
* http
*/
template Service "http" inherits "icinga-service" {
check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
}
/**
* ssh
*/
template Service "ssh" inherits "icinga-service" {
check_command = "$plugindir$/check_ssh '$address$'",
}
/**
* local checks
*/
template Service "disk space" inherits "icinga-service" {
check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
macros += {
wfree = "20%",
cfree = "10%",
}
}
template Service "current users" inherits "icinga-service" {
check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 20,
cgreater = 50,
}
}
template Service "total processes" inherits "icinga-service" {
check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
macros += {
wgreater = 250,
cgreater = 400,
}
}
template Service "current load" inherits "icinga-service" {
check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
macros += {
wload1 = 5.0,
wload5 = 4.0,
wload15 = 3.0,
cload1 = 10.0,
cload5 = 6.0,
cload15 = 4.0,
}
}
/**
* demo check
*/
template Service "demo" inherits "icinga-service" {
check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
}
/**
* And finally we define some host that should be checked.
*/
object Host "localhost" {
services = {
"ping4", "ping6",
"http", "ssh",
"current load", "total processes",
"current users", "disk space",
"demo"
},
macros = {
address = "127.0.0.1",
address6 = "::1"
},
check_interval = 1m
}
/**
* Include mass hosts
*/
#include "icinga2_masshosts.conf"

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,24 @@
#!/usr/bin/env python
#/******************************************************************************
# * Icinga 2 *
# * Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/) *
# * *
# * This program is free software; you can redistribute it and/or *
# * modify it under the terms of the GNU General Public License *
# * as published by the Free Software Foundation; either version 2 *
# * of the License, or (at your option) any later version. *
# * *
# * This program is distributed in the hope that it will be useful, *
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# * GNU General Public License for more details. *
# * *
# * You should have received a copy of the GNU General Public License *
# * along with this program; if not, write to the Free Software Foundation *
# * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
# ******************************************************************************/
import sys
import subprocess
import socket

View File

@ -1,8 +0,0 @@
#!/bin/sh
echoerr() { echo "$@" 1>&2; }
foo=$(shuf -i 0-3 -n 1)
echo "flapme: $foo"
echoerr "stderr test"
exit $foo

1
m4/.gitignore vendored
View File

@ -1,4 +1,5 @@
argz.m4
compile
config.guess
config.sub
depcomp