Monitoring

NixOS machines are monitored by Sensu Core (1.x) with various plugins. We run checks regularly by default to ensure platform and service health. Check results are displayed on the status pages at My Flying Circus. Refer to the role documentation pages for information about what is checked for a specific role.

Custom Checks

Configure custom checks in /etc/sensu-client. This directory is passed to sensu as additional config directory. You can add .json files for your checks there. Refer to the Sensu check guide for more information and available options.

Example:

{
    "checks" : {
        "my-custom-check" : {
        "notification" : "custom check broken",
        "command" : "/srv/user/bin/nagios_compatible_check",
        "interval": 60,
        "standalone" : true
        },
        "my-other-custom-check" : {
        "notification" : "custom check broken",
        "command" : "/srv/user/bin/nagios_compatible_other_check",
        "interval": 600,
        "standalone" : true
        }
    }
}

To activate the checks, run sudo fc-manage --build. For further information about local configuration, also see Local Configuration.

The following packages are available in the sensu check PATH:

You can use sudo -iu <s-user> <command> to run commands in a service user context.