about summary refs log tree commit diff
path: root/nixos/modules/services/monitoring/goss.md
blob: 1e636aa3bdf33c10e23e581ff60f3165ed519a77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Goss {#module-services-goss}

[goss](https://goss.rocks/) is a YAML based serverspec alternative tool
for validating a server's configuration.

## Basic Usage {#module-services-goss-basic-usage}

A minimal configuration looks like this:

```
{
  services.goss = {
    enable = true;

    environment = {
      GOSS_FMT = "json";
      GOSS_LOGLEVEL = "TRACE";
    };

    settings = {
      addr."tcp://localhost:8080" = {
        reachable = true;
        local-address = "127.0.0.1";
      };
      command."check-goss-version" = {
        exec = "${lib.getExe pkgs.goss} --version";
        exit-status = 0;
      };
      dns.localhost.resolvable = true;
      file."/nix" = {
        filetype = "directory";
        exists = true;
      };
      group.root.exists = true;
      kernel-param."kernel.ostype".value = "Linux";
      service.goss = {
        enabled = true;
        running = true;
      };
      user.root.exists = true;
    };
  };
}
```