File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ You can create a docker container and run a script `slottifier.py` by running:
32
32
``` docker run --rm harbor.stfc.ac.uk/stfc-cloud/cloud-monitoring:latest \
33
33
--volume /tmp/monitoring.conf:/app/monitoring.conf \
34
34
--volume /tmp/clouds.yaml:/etc/openstack/clouds.yaml \
35
- slottifier /app/monitoring.conf
35
+ slottifier
36
36
```
37
37
38
38
## Local Python Package
@@ -56,8 +56,7 @@ docker build . -t cloud-monitoring:1
56
56
docker run --rm cloud-monitoring:1 \
57
57
--volume /tmp/monitoring.conf:/app/monitoring.conf \
58
58
--volume /tmp/clouds.yaml:/etc/openstack/clouds.yaml \
59
- slottifier /app/monitoring.conf
60
-
59
+ slottifier
61
60
```
62
61
63
62
# Usage
@@ -99,4 +98,17 @@ This script collects various service statuses, usages and limits for all hypervi
99
98
100
99
` python -m cloudMonitoring vm-states /tmp/monitoring.conf `
101
100
102
- This script is used to total the number of virtual machines in running, shutoff, errored and build states
101
+ This script is used to total the number of virtual machines in running, shutoff, errored and build states
102
+
103
+
104
+ # Creating Cron jobs
105
+ You can create a cron job like so:
106
+ ``` commandline
107
+ sudo tee /etc/cron.d/service-stats.cron > /dev/null << 'EOF'
108
+ # run every hour
109
+ 0 * * * * root docker run --rm harbor.stfc.ac.uk/stfc-cloud/cloud-monitoring:latest \
110
+ --volume /tmp/monitoring.conf:/app/monitoring.conf \
111
+ --volume /tmp/clouds.yaml:/etc/openstack/clouds.yaml \
112
+ slottifier
113
+ EOF
114
+ ```
You can’t perform that action at this time.
0 commit comments