how to add a machine to nagios

Configuring nagios itself

nagios-master.cfg is stored in dsa-nagios.git , the nagios configuration is derived from that file.

Go and add your host there, you can roughly c/p another, and select whichever hostgroups you think you need. For stravinsky, as of 2022/04/14, I used this snippet:

  stravinsky:
    address: 82.195.75.108
    parents: ganeti-manda
    hostgroups: computers, service, kvmdomains, bullseye, systemd-timesyncd

Commit and push, and let nagios.d.o be updated.

If you want to make sure everything is going smoothly

Puppet is run regularly on each host, but you can run it manually if you don't want to wait.

Go on your host and run the puppet agent as root

    : ::client:: && puppet agent -t

Almost everything should come up quite fast. Some checks for logging and backup hosts need these hosts to be puppet-updated, you can either update these on your own or wait until the automatic puppet run is done.

If samhain is unhappy

Even if you clear the samhain policy violations, you'll have to run the dsa-update-samhain-status command to have the changes propagated to the monitoring.