Moved additional variables into .env file, updated README.md.
This commit is contained in:
parent
bfd8e4fa36
commit
d04c18d5da
2 changed files with 16 additions and 3 deletions
13
README.md
13
README.md
|
|
@ -12,18 +12,31 @@ The following environment variables must be defined in your `.env` file:
|
|||
|
||||
- **API_KEY**
|
||||
Your Cisco Meraki API key used to access and manage Meraki networks.
|
||||
`Required by every script.`
|
||||
|
||||
- **NETWORK_ID**
|
||||
The network ID of the network you want to parse.
|
||||
`Required by deviceCheck.py.`
|
||||
|
||||
- **DEVICE_MAC**
|
||||
The MAC address of the device you want to monitor.
|
||||
`Required by deviceCheck.py.`
|
||||
|
||||
- **SMTP_SERVER**
|
||||
Your outgoing SMTP mail server address.
|
||||
`Required by deviceCheck.py.`
|
||||
|
||||
- **SMTP_PORT**
|
||||
Your outgoing SMTP mail server port.
|
||||
`Required by deviceCheck.py.`
|
||||
|
||||
- **SMTP_EMAIL**
|
||||
The email address used to send notifications.
|
||||
`Required by deviceCheck.py.`
|
||||
|
||||
- **SMTP_PASS**
|
||||
The password for the SMTP email account.
|
||||
`Required by deviceCheck.py.`
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ load.dotenv()
|
|||
|
||||
#Variable declaration.
|
||||
API_KEY = os.getenv("API_KEY")
|
||||
NETWORK_ID = "N_573646002536361150"
|
||||
CLIENT_MAC = "e4:f1:4c:7e:eb:7a"
|
||||
NETWORK_ID = os.getenv("NETWORK_ID")
|
||||
CLIENT_MAC = os.getenv("CLIENT_MAC")
|
||||
|
||||
#Passes the API key to the header.
|
||||
HEADERS = {
|
||||
|
|
@ -72,7 +72,7 @@ while True:
|
|||
send_email(
|
||||
subject="Meraki Alert",
|
||||
body="Client " + CLIENT_MAC + " is offline!",
|
||||
to_email="tanner@acoservices.com"
|
||||
to_email=os.getenv("SMTP_RECEIVER")
|
||||
)
|
||||
|
||||
#Wait a minute before checking again.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue