summaryrefslogtreecommitdiff
path: root/services/main.cf
blob: 0d4270f4488f02e9d43446c3d547e4f4daddbeb0 (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
body file control
{
    inputs => {
        "services/common.cf",
        "services/applications.cf",
        "services/os.cf",
        "services/julien.cf",
    };
}

bundle common classify
{
    vars:
        any::
            "bundles" slist => {
                "common",
                "os",
                "julien",
                "bareos_fd",
                "check_mk",
                "nrpe",
                "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:
        andromeda|collab_jde::
            "andromeda" usebundle => openvpn;
        nagios::
            "nagios"  usebundle => nagios;
}