summaryrefslogtreecommitdiff
path: root/services/main.cf
blob: 1305be08621f75beb9e18fddf877f63b7ed3c97b (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
body file control
{
    inputs => {
        "services/common.cf",
        "services/applications.cf",
        "services/inventory.cf",
        "services/os.cf",
        "services/julien.cf",
    };
}

bundle common classify
{
    vars:
        any::
            "bundles" slist => {
                "bareos_fd",
                "check_mk",
                "common",
                "inventory",
                "julien",
                "nrpe",
                "os",
                "sshd",
            };
    classes:
        any::
            "awh" or => {
                "hurricane",
            };
            "containers" or => {
                regline(".*/lxc/.*", "/proc/1/cgroup"),
                regline(".*lxc", "/proc/1/environ"),
            };
            "console_julien" or => {
                "andromeda",
                "collab_jde",
                "console",
                "hero",
                "hurricane",
            };
            "mail_servers" or => { "legend" };
            "nrpe" expression => "freebsd";
            "x11_desktop" or => {
                "hero",
            };
}

bundle common g
{
    vars:
        has_host_data::
            "host_data" data => readyaml("$(sys.inputdir)/cmdb/hosts/$(sys.host).yaml", 100k);
    classes:
        any::
            "has_host_data" expression => fileexists("$(sys.inputdir)/cmdb/hosts/$(sys.host).yaml");
}

bundle agent main
{
    methods:
        linux.!containers::
            "any" usebundle => fail2ban;
            "any" usebundle => openvpn;
        nagios::
            "nagios"  usebundle => nagios;
}