Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You mentioned Gmail, so you may be interested in googlecl, which gives you command-line controls for things like Google Calendar and Docs. Unfortunately they do not yet support Gmail, but if your long-term preference is to use a Gmail account as the hub of your status reports, then googlecl may be your best option.</p> <p>In the short run, you can try out googlecl right now using the commands for Calendar, Blogger, or Docs, all of which are already supported. For example, these commands add events to Google Calendar:</p> <pre><code>google calendar add --cal server1 "I'm still alive at 13:45 today" google calendar add "Server 1 is still alive at 2011-02-08 19:43" </code></pre> <p>...and these commands query the calendar:</p> <pre><code>google calendar list --fields title,when,where --cal "commitments" google calendar list -q party --cal ".*" </code></pre> <p>Come to think of it, you may even find that Calendar, Blogger, or Docs are a more appropriate place than Gmail for tracking status updates. For example, a spreadsheet or calendar format should make it easier to generate a graphical representation of when a given service was up or down.</p> <p>You still need to write a little program which uses googlecl to query the calendar (or blog, or docs, or whatever), but once you have simple command lines at your disposal, the rest should be pretty straightforward. Here's a link to further information about googlecl:</p> <p><a href="http://code.google.com/p/googlecl/" rel="nofollow">http://code.google.com/p/googlecl/</a></p> <p>If you really want to use Gmail, and use it right now, they offer an IMAP interface. Using IMAP, you can perform numerous simple operations, such as determining if a message exists which contains a specified subject line. Here's one good place to learn about the details:</p> <p><a href="http://mail.google.com/support/bin/answer.py?hl=en&amp;answer=75725" rel="nofollow">http://mail.google.com/support/bin/answer.py?hl=en&amp;answer=75725</a></p> <p>Here's a quick example that uses IMAP and Python to list the ten most-recent emails which have a given Gmail "Label":</p> <pre><code> import getpass, imaplib # These gmail_* utilties are from https://github.com/drewbuschhorn/gmail_imap import gmail_mailboxes, gmail_messages, gmail_message # Update these next lines manually, or turn them into parms or somesuch. gmail_account_name = "your_user_name@gmail.com" # Your full gmail address. mailbox_name = "StatusReports" # Use Gmail "labels" to tag the relevant msgs. class gmail_imap: def __init__ (self, username, password): self.imap_server = imaplib.IMAP4_SSL("imap.gmail.com",993) self.username = username self.password = password self.loggedIn = False self.mailboxes = gmail_mailboxes.gmail_mailboxes(self) self.messages = gmail_messages.gmail_messages(self) def login (self): self.imap_server.login(self.username,self.password) self.loggedIn = True def logout (self): self.imap_server.close() self.imap_server.logout() self.loggedIn = False # Right now this prints a summary of the most-recent ten (or so) messages # which have been labelled in Gmail with the string found in mailbox_name. # It won't work unless you've used Gmail settings to allow IMAP access. if __name__ == '__main__': gmail = gmail_imap(gmail_account_name,getpass.getpass()) gmail.messages.process(mailbox_name) for next in gmail.messages: message = gmail.messages.getMessage(next.uid) # This is a good point in the code to insert some kind of search # of gmail.messages. Instead of unconditionally printing every # entry (which is what the code below does), issue some sort of # warning if the expected email (message.From and message.Subject) # did not arrive within the expected time frame (message.date). print message.date, message.From, message.Subject gmail.logout() </code></pre> <p>As noted in the code comments, you could adapt it to issue some sort of warning if the most-recent messages in that mailbox do not contain an expected message. Then just run the Python program once per day (or whatever time period you require) to see if the expected email message was never received.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload