Skip to content

Instantly share code, notes, and snippets.

View dnsmichi's full-sized avatar
🦊
GitLab

Michael Friedrich dnsmichi

🦊
GitLab
View GitHub Profile
define service {
name bla-passive-template
use pnp-svc
is_volatile 1
check_command unknown-report!"Report out of Date!"
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
active_checks_enabled 0
passive_checks_enabled 1
@dnsmichi
dnsmichi / gist:2629512
Created May 7, 2012 18:33
debian pnp config for icinga
# performance data
process_performance_data=1
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
service_perfdata_file_mode=a
host_perfdata_file_mode=a
@dnsmichi
dnsmichi / gist:8982597
Created February 13, 2014 19:55 — forked from azet/gist:8979114
Return-Path: <azet@azet.org>
Received: from [10.60.20.43] ([193.170.94.254])
by mx.google.com with ESMTPSA id f45sm8725929eeg.5.2014.02.13.08.32.23
for <multiple recipients>
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Thu, 13 Feb 2014 08:32:24 -0800 (PST)
Message-ID: <52FCF399.7090208@azet.org>
Date: Thu, 13 Feb 2014 17:32:25 +0100
From: Aaron Zauner <azet@azet.org>
16:33:46 < ccesario> file ./Bin/Release/icinga2 && ./Bin/Release/icinga2 --version
16:33:46 < ccesario> ./Bin/Release/icinga2: executable (RISC System/6000) or object module not stripped
16:33:46 < ccesario> icinga2 - The Icinga 2 network monitoring daemon. (Version: v0.0.9-173-g2874fe1)
'...' means something is missing
object Host "checkper1" {
import ...
check_period = "8x5" //apply rule matches
groups = [ "foo-server" ]
...
vars.has_custom_check_period = true //could be used too for apply match
}
@dnsmichi
dnsmichi / ix-icinga2-errata
Created July 16, 2014 11:12
Stand: 16.7.2014
RPM Repository
==============
< # wget http://packages.icinga.org/epel/6/snapshot/ICINGA-snapshot.repo -O /etc/yum.repos.d/ICINGA-snapshot.repo
> # wget http://packages.icinga.org/epel/ICINGA-snapshot.repo -O /etc/yum.repos.d/ICINGA-snapshot.repo
Cluster Konfigurationssynchronisation
=====================================
ApiListener Objekte benötigen die zusätzliche Einstellung 'accept_config = true' um von der Parentzone Konfiguration anzunehmen.
Explain the following:
1) Which User is getting notified for which Host?
2) Which assign/ignore expressions match for the Hosts and Users?
/* generated by puppet */
object Host "puppet-generated-host1" {
import "puppet-host"
import "db-server"
check_Command = "generated-hostalive"
@dnsmichi
dnsmichi / icinga2-apply-for-in-dictionary
Last active June 25, 2019 21:24
Using icinga2 2.2 features with apply for in dictionary and attribute assignment
# cat 7560.conf
object Host "7560-server" {
import "test-generic-host"
address = "127.0.0.1"
check_command = "hostalive"
vars.interfaces["eth0"] = {
//vars.interfaces.eth0 = {
"2dcoord" = "3,5"
port = 1
object CheckCommand "no-address-http" {
import "http"
arguments.remove("-I")
}
apply Service for (http_vhost => config in host.vars.http_vhosts) {
import "generic-service"
check_command = "no-address-http"
object Host "lcp-example" {
import "rittal-host"
display_name = "Rittal LCP Example"
address = "192.168.1.1"
groups += [ "rittal" ]
vars.rittal_checks["water-out-temp"] = {
display_name = "Water-Out Temperature [decigrade C]"
rittal_oid = ".1.3.6.1.4.1.2606.7.4.2.2.1.11.2.74"
rittal_warn = "50:250"