README.md 738 Bytes
Newer Older
remy's avatar
remy committed
1
2
3
4
5
6
7
## Prerequisite

You will need the customservice.status.py file in `<salt_root_directory>/_modules`.

You can get a copy of the file [here](https://gitlab.mbb.univ-montp2.fr/saltstack-formulas/check_services/-/snippets/3).


remy's avatar
remy committed
8
This formula checks services/daemon from a pillar (pillar:machines/hosts\*.sls).
remy's avatar
remy committed
9

remy's avatar
remy committed
10
11
12
13
14
15
16
17
Usage:

```bash
salt '*' state.sls check_services
```

Actually, I am using it with json output. Then I read the results with a specific php file every morning (cron).

18
19
20
21
22
## Roles

If a grain named `roles` exists on the minion, it will check some additional services based on these `roles`.

We are using [`set_grains` formula](https://gitlab.mbb.univ-montp2.fr/saltstack-formulas/set_grains) to set two grains: `roles` and `pool`.
remy's avatar
remy committed
23