File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments