Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View dnsmichi's full-sized avatar
🦊
GitLab

Michael Friedrich dnsmichi

🦊
GitLab
View GitHub Profile
@dnsmichi
dnsmichi / gist:f4ce1c350ccc90e843d1252c63a4e311
Last active July 17, 2018 17:13
icinga2 2.9 centos 6 docker
michi@imagine ~ $ sudo docker run -ti centos:6 bash
Unable to find image 'centos:6' locally
Trying to pull repository docker.io/library/centos ... 
sha256:bac053540cfdc5c034191d2f20207dc83f5336bca0bcdbb9d9a58a64ed30d4f3: Pulling from docker.io/library/centos
987d765a926d: Pull complete 
Digest: sha256:bac053540cfdc5c034191d2f20207dc83f5336bca0bcdbb9d9a58a64ed30d4f3
Status: Downloaded newer image for docker.io/centos:6
[root@03e2ed2c8b79 /]# yum install http://packages.icinga.com/epel/icinga-rpm-release-6-latest.noarch.rpm
Loaded plugins: fastestmirror, ovl
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"
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"
@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
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 / 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.
'...' 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
}
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)
@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>
@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