-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathise-up.sh
executable file
·39 lines (35 loc) · 1.05 KB
/
ise-up.sh
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
#!/bin/bash
#
# Simple URL monitoring script.
#
# Requires setting the these environment variables using the `export` command:
# export ISE_PPAN='1.2.3.4' # hostname or IP address of ISE Primary PAN
# export ISE_REST_USERNAME='admin' # ISE ERS admin or operator username
# export ISE_REST_PASSWORD='C1sco12345' # ISE ERS admin or operator password
# export ISE_CERT_VERIFY=false # validate the ISE certificate
#
# You may add these export lines to a text file and load with `source`:
# source ise-env.sh
SERVER=$ISE_PPAN
USERNAME=$ISE_REST_HOSTNAME
PASSWORD=$ISE_REST_PASSWORD
HEADER_XML='Accept: application/xml'
HEADER_JSON='Accept: application/json'
HEADER=$HEADER_JSON
# URI=/ers/config/internaluser
# URI=/ers/config/adminuser
URI=/
SLEEP=5
while [ 1 ]; do
date
curl -k \
--connect-timeout 3 \
--max-time 10 \
--location \
--header "${HEADER}" \
--head \
--user $USERNAME:$PASSWORD \
--request GET https://${SERVER}${URI}
printf "_____\n"
sleep $SLEEP
done