forked from cirrax/openstack-nagios-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-command-definitions
More file actions
executable file
·53 lines (47 loc) · 1.76 KB
/
update-command-definitions
File metadata and controls
executable file
·53 lines (47 loc) · 1.76 KB
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
#!/bin/bash
# vim: ft=shell
FILE=${FILE:-"contrib/icinga2-command-definitions.conf"}
CHECKS=(
openstacknagios/ceilometer/statistics.py
openstacknagios/cinder/services.py
openstacknagios/glance/images.py
openstacknagios/gnocchi/measures.py
openstacknagios/gnocchi/status.py
openstacknagios/keystone/status.py
openstacknagios/neutron/agents.py
openstacknagios/neutron/floating_ips.py
openstacknagios/neutron/network_ip_availability.py
openstacknagios/neutron/routers.py
openstacknagios/nova/hypervisors.py
openstacknagios/nova/services.py
openstacknagios/panko/events.py
openstacknagios/rally/results.py
)
echo "# vim: ft=icinga" > "$FILE"
cat <<-EOF >> "$FILE"
/* command objects for the nagios-openstack-plugins
* used by icinga2
*
* Copyright (C) 2018 Cirrax GmbH http://www.cirrax.com
* Benedikt Trefzer <benedikt.trefzer@cirrax.com>
* Copyright (C) 2024 HPI https://hpi.de
* Jan Graichen <jan.graichen@hpi.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
EOF
for check in "${CHECKS[@]}"; do
PYTHONPATH=. pdm run python "$check" --print-command-definition >> "$FILE"
done