Skip to content

Commit 30f78e9

Browse files
committed
Added ssllabs check, forwards to nsca
1 parent d11a93b commit 30f78e9

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

check_ssllabs.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
# Query the ssllabs tests for a site
4+
# (C) 2012 Mark Janssen, Sig-I/O Automatisering
5+
# License: CC-BY-3.0 http://creativecommons.org/licenses/by/3.0/
6+
7+
SITE=$1
8+
9+
NSCA=/usr/sbin/send_nsca
10+
NSCACONF=/etc/send_nsca.cfg
11+
NSCASERVER=your.nagios.system
12+
HOSTNAME=`hostname`
13+
14+
PERCENTAGE=`curl -k -s https://www.ssllabs.com/ssltest/analyze.html?d=${SITE} | grep -A 1 percentage_g | tail -1 | tr -d ' \n\r'`
15+
16+
OK=3
17+
if [[ ${PERCENTAGE} -ge 85 ]];
18+
then
19+
OK=0
20+
else
21+
if [[ ${PERCENTAGE} -ge 75 ]];
22+
then
23+
OK=1;
24+
else
25+
OK=2;
26+
fi
27+
fi
28+
29+
echo "${HOSTNAME} ssllabs_${SITE} ${OK} SSLLabs score for ${SITE} = ${PERCENTAGE}" | ${NSCA} -c ${NSCACONF} -H ${NSCASERVER}
30+

reset_ssllabs.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
# Clear the ssllabs cache for a site, run max 1x per day
4+
# (C) 2012 Mark Janssen, Sig-I/O Automatisering
5+
# License: Public Domain
6+
7+
curl -k -o /dev/null -s https://www.ssllabs.com/ssltest/clearCache.html?d=$1
8+
sleep 5
9+
curl -k -o /dev/null -s https://www.ssllabs.com/ssltest/analyze.html?d=$1

0 commit comments

Comments
 (0)