Skip to content

Instantly share code, notes, and snippets.

build:
stage: build
before_script:
- apt update && apt -y install devscripts git-buildpackage
- mk-build-deps --tool "apt -y -o Debug::pkgProblemResolver=yes \
--no-install-recommends" --install -r debian/control
script:
- git checkout master
@formorer
formorer / dynamic.cpp
Created March 21, 2017 20:34
Dynamische Objekterstellung
/**
* define customerenvs - projectname, customername, customerdomainpart
*/
vars.custenvs.swisslitest01 = { customername = "customer swissli", domainpart = "swissli-test" }
vars.custenvs.gipfelitest01 = { customername = "customer gipfeli", domainpart = "gipfli-test" }
vars.custenvs.schwingerlitest01 = { customername = "customer schwingerli", domainpart = "schwingerli-test" }
for (custenv_name => config in vars.custenvs) {
object Service "shibboleth-http-external" use(custenv_name, config){
@formorer
formorer / clustercheck.cpp
Created March 21, 2017 20:23
Clusterchecks mit Icinga2
object CheckCommand "clustercheck" {
import "plugin-check-command"
command = {{
var cmd = [ PluginDir + "/check_dummy" ]
var cluster_nodes = macro("$cluster_nodes$")
var host_failed = [ ]
for (cluster_node in cluster_nodes) {
log("Check state of " + cluster_node)
/* get host state from node */
var host = get_host(cluster_node)
@formorer
formorer / hosts.cpp
Last active March 20, 2017 11:40
Icinga2 Host
object Host "myhostname" {
/* Import the default host template defined in `templates.conf`. */
import "generic-host"
/* Specify the address attributes for checks e.g. `ssh` or `http`. */
address = "127.0.0.1"
address6 = "::1"
/* Set custom attribute `os` for hostgroup assignment in `groups.conf`. */
vars.os = "Linux"
icinga2
├── conf.d
│   ├── app.conf
│   ├── apt.conf
│   ├── commands.conf
│   ├── downtimes.conf
│   ├── groups.conf
│   ├── hosts.conf
│   ├── notifications.conf
│   ├── satellite.conf

Keybase proof

I hereby claim:

  • I am formorer on github.
  • I am formorer (https://keybase.io/formorer) on keybase.
  • I have a public key whose fingerprint is 6E39 66C1 E1D1 5DB9 73D0 5B49 1E45 F8CA 9DE2 3B16

To claim this, I am signing this object: