This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application: ****your app name**** | |
version: 1 | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: /.* | |
script: main.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import commands | |
import httplib | |
from urllib import urlencode | |
import time | |
servername = 'MrSolaris' | |
data = commands.getoutput('zpool list') + "\r\n\r\n" + "Uptime: " + commands.getoutput('uptime') + "\r\nDate: " + commands.getoutput('date') + "\r\n\r\n" + "Uptime: " + commands.getoutput('zpool status -v') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import commands | |
import httplib | |
from urllib import urlencode | |
import time | |
servername = 'MrPenguin' | |
data = commands.getoutput('df -h') + "\r\n\r\n" + "Uptime: " + commands.getoutput('uptime') + "\r\nDate: " + commands.getoutput("date -R") + "\r\n\r\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
import commands | |
# Email details | |
from_address = 'Status reporter<my.status.reporter@gmail.com>' | |
to_address = 'recipient@gmail.com' | |
message_subject = "My server daily report" | |
# Credentials | |
username = 'my.status.reporter@gmail.com' |