Skip to content

Instantly share code, notes, and snippets.

Avatar
🦊
GitLab

Michael Friedrich dnsmichi

🦊
GitLab
View GitHub Profile
View gist:2498028
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
debian pnp config for icinga
View gist:2629512
# 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
View gist:8982597
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>
View gist:10888396
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)
View icinga2-julian-bsp
'...' 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
}
View ix-icinga2-errata
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.
View gist:50c280f3b42a47f5bed4
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 Jun 25, 2019
Using icinga2 2.2 features with apply for in dictionary and attribute assignment
View icinga2-apply-for-in-dictionary
# 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
View icinga2-remove-command-argument-from-http-check
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"
View icinga2-rittal-checks-apply-for
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"