Skip to content

Initial Setup

Bailey Kasin edited this page Feb 1, 2020 · 5 revisions

Initial Setup

After gogios is installed, all that needs to be configured is checks and notifiers.

The Config File

The default gogios config file is /etc/gogios/gogios.toml. Each option has a brief explanation comment above it. The main things to note are:

interval = The frequency at which checks are run. The default is three minutes, but it can be increased or decreased depending on your needs. Try to avoid having the interval be lower than the time it takes for all checks to complete.

timeout = This value represents how long a check run before it is terminated and the status set to "Timed Out".

IP and api_ip = By default the web interface and REST API can only be accessed on localhost. I recommend setting up an nginx reverse proxy instead of changing these values, but if you want it available to be remotely accessible on any the server's interfaces, change this to "0.0.0.0".

Notifiers will each have their own wiki page that you can find in the sidebar.

Writing Checks

gogios reads from /etc/gogios/checks.json and executes commands from top to bottom. A check follows the format of:

{
    "id": "1",
    "title": "Integrity of Service Engine",
    "command": "echo working",
    "expected": "working"
}

Where:

ID: The ID of the check. Currently only used with the REST API. Should be a number.

Title: A friendly name that will be displayed in the web interface.

Command: The command that will be executed in a non-privileged sh shell.

Expected: The output to be checked for when executing the above command. The full string needs to be contained in the output, but there can be extra output around it.

An example would be:

{
    "id": "3",
    "title": "Web",
    "command": "curl -I https://angrysysadmins.tech",
    "expected": "200 OK"
}

This checks that the website is available and returning the correct status code. If your command does not exit in time, the status will be set to Timed Out.

Clone this wiki locally