Étude d’icinga2 #2

Closed
opened 3 years ago by vv222 · 2 comments
vv222 commented 3 years ago
Owner

Icinga2 fait partie des candidats aux outils de monitoring que nous pourrions utiliser.

Ce ticket peut servir à partager nos expériences avec celui-ci et mettre en avant des extraits de documentation pertinents.

Icinga2 fait partie des candidats aux outils de monitoring que nous pourrions utiliser. Ce ticket peut servir à partager nos expériences avec celui-ci et mettre en avant des extraits de documentation pertinents. * Site officiel : https://icinga.com/ * Documentation : https://icinga.com/docs/ * Forum : https://community.icinga.com/
Owner

Exemple d'un fichier de config pour un hôte sur icinga2:

object Host "MaMachine" {
  /* Import the default host template defined in `templates.conf`. */
  import "generic-host"

  /* Specify the address attributes for checks e.g. `ssh` or `http`. */
  address = "i.p.v.4"
  /*address6 = "::1"*/
  vars.domain = ["example.org","www.example.org"]

  /* Set custom attribute `os` for hostgroup assignment in `groups.conf`. */
  vars.os = "Linux"

  /* Define http vhost attributes for service apply rules in `services.conf`. */
  vars.http_vhosts["http"] = {
    http_vhost = "example.org"
    http_uri = "/"
    http_ssl = false
    http_ignore_body = true
    http_expect = "HTTP/1.1 302 Found"
  }
  vars.http_vhosts["https"] = {
    http_vhost = "example.org"
    http_uri = "/"
    http_ssl = true
  }
  vars.http_vhosts["nextcloud"] = {
    http_vhost = "example.org"
    http_uri = "/cloud/"
    http_ssl = true
    http_ignore_body = true
  }
  vars.http_vhosts["dokuwiki"] = {
    http_vhost = "example.org"
    http_uri = "/wiki/"
    http_ssl = true
    http_ignore_body = true
    http_auth_pair = "username:password"
  }
  vars.http_vhosts["dokuwiki_protec"] = {
    http_vhost = "example.org"
    http_uri = "/wiki/"
    http_ssl = true
    http_ignore_body = true
    http_expect = "HTTP/1.1 401 Unauthorized"
  }
  vars.http_vhosts["matomo"] = {
    http_vhost = "example.org"
    http_uri = "/analytics/"
    http_ssl = true
    http_ignore_body = true
    http_expect = "HTTP/1.1 401 Unauthorized"
  }*/
  vars.http_vhosts["matomo_spy"] = {
    http_vhost = "example.org"
    http_uri = "/analytics/piwik.php"
    http_ssl = true
    http_ignore_body = true
  }


  /* Define disks and attributes for service apply rules in `services.conf`. */
  vars.disks["disk"] = {
    /* No parameters. */
  }
  vars.disks["disk /"] = {
    disk_partitions = "/"
  }

  /* Define notification mail attributes for notification apply rules in `notifications.conf`. */
  vars.notification["mail"] = {
    /* The UserGroup `icingaadmins` is defined in `users.conf`. */
    groups = [ "icingaadmins" ]
  }
}```
Exemple d'un fichier de config pour un hôte sur icinga2: ``` object Host "MaMachine" { /* Import the default host template defined in `templates.conf`. */ import "generic-host" /* Specify the address attributes for checks e.g. `ssh` or `http`. */ address = "i.p.v.4" /*address6 = "::1"*/ vars.domain = ["example.org","www.example.org"] /* Set custom attribute `os` for hostgroup assignment in `groups.conf`. */ vars.os = "Linux" /* Define http vhost attributes for service apply rules in `services.conf`. */ vars.http_vhosts["http"] = { http_vhost = "example.org" http_uri = "/" http_ssl = false http_ignore_body = true http_expect = "HTTP/1.1 302 Found" } vars.http_vhosts["https"] = { http_vhost = "example.org" http_uri = "/" http_ssl = true } vars.http_vhosts["nextcloud"] = { http_vhost = "example.org" http_uri = "/cloud/" http_ssl = true http_ignore_body = true } vars.http_vhosts["dokuwiki"] = { http_vhost = "example.org" http_uri = "/wiki/" http_ssl = true http_ignore_body = true http_auth_pair = "username:password" } vars.http_vhosts["dokuwiki_protec"] = { http_vhost = "example.org" http_uri = "/wiki/" http_ssl = true http_ignore_body = true http_expect = "HTTP/1.1 401 Unauthorized" } vars.http_vhosts["matomo"] = { http_vhost = "example.org" http_uri = "/analytics/" http_ssl = true http_ignore_body = true http_expect = "HTTP/1.1 401 Unauthorized" }*/ vars.http_vhosts["matomo_spy"] = { http_vhost = "example.org" http_uri = "/analytics/piwik.php" http_ssl = true http_ignore_body = true } /* Define disks and attributes for service apply rules in `services.conf`. */ vars.disks["disk"] = { /* No parameters. */ } vars.disks["disk /"] = { disk_partitions = "/" } /* Define notification mail attributes for notification apply rules in `notifications.conf`. */ vars.notification["mail"] = { /* The UserGroup `icingaadmins` is defined in `users.conf`. */ groups = [ "icingaadmins" ] } }```
Owner

Bon, on à l'air de partir sur Netdata, on peut donc fermer ce ticket.

Bon, on à l'air de partir sur Netdata, on peut donc fermer ce ticket.
bendia closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.