-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-status.cloud.microsoft
More file actions
28 lines (28 loc) · 1.03 KB
/
Copy pathcheck-status.cloud.microsoft
File metadata and controls
28 lines (28 loc) · 1.03 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
#!/bin/bash
#
# Check to chcek the rusults from the check check-status.cloud.microsoft.sh
# This check depends on check-status.cloud.microsoft.sh that runs as a cronjob
# Used on the local or monitoring host
#
# created bij AHE 01-08-2024
#
counter=$(grep -oh ">Available<" /tmp/file.html | wc -l)
#
#echo $counter
echo "<<<local>>>"
#
if [[ $counter -eq 3 ]] ; then
echo "0 Status.Cloud.Microsoft - All services are available at Status.Cloud.Microsoft https://status.cloud.microsoft/"
else
if [[ $counter -eq 2 ]] ; then
echo "1 Status.Cloud.Microsoft - One service is unavailable at Status.Cloud.Microsoft https://status.cloud.microsoft/"
else
if [[ $counter -eq 1 ]] ; then
echo "2 Status.Cloud.Microsoft - Two services are unavailable at Status.Cloud.Microsoft https://status.cloud.microsoft/"
else
if [[ $counter -eq 0 ]] ; then
echo "2 Status.Cloud.Microsoft - All services are unavailable at Status.Cloud.Microsoft https://status.cloud.microsoft/"
fi
fi
fi
fi