tips

New view option for encrypted Caboodle entries

Continuing the theme of using Caboodle User Guide pages as blog posts, here's the updated info about the encryption feature, which was significantly enhanced in version 1.2:

The Encrypt Entry sheet. This sheet slides out from the main editor window when you choose the File > Encrypt Entry... menu item, or the Encrypt toolbar button. This operation is only available when one entry is selected.

Enter a password or phrase to use to encrypt the entry, and enter it again to confirm that you typed it correctly. The password will not be shown. Make sure that you remember the password — there is no way to access your entry if you forget it!

You can check the Remember this password in my keychain box to have Caboodle store the entered password in your keychain. If it is in the keychain, and the keychain is unlocked, the password will be offered automatically when you come to view or decrypt the entry.

A default password can be offered from one of three sources: an existing keychain item (e.g. from when this entry was previously encrypted; from the most recently entered password for any entry (so you can easily use the same password for several entries); or a default password, as set in the Security preferences. If none of those is available, the fields are blank. Regardless, you can of course type a new password whenever desired.

Once an entry is encrypted, it displays with a lock instead of the content, and the menu item and toolbar button change to Decrypt:

When you choose the File > Decrypt Entry... menu item or the Decrypt toolbar button, the following sheet is displayed:

Here you have two options:

  • You can click View to temporarily decrypt the entry for read-only viewing, while leaving it encrypted on disk. It will remain visible until you quit Caboodle.
  • Or you can click Decrypt to fully decrypt it, so it can be edited. If you decrypt it, you'll have to encrypt it again after editing if you want to keep it encrypted on disk.

Simply enter the correct password (again it won't be shown), click View or Decrypt, and the entry will be re-displayed as it was before encryption. If you don't enter the correct password, it will give you three more attempts, though you can always cancel and re-try if necessary.

As with the encryption sheet, you can save the entered password in the keychain, and it offers a password from one of the three sources: keychain, previous entry, or default password. It only offers a password if it is correct, so you can just click a button without entering anything if one is offered.

If just viewing the entry, the icon will remain as a lock, the fields will be disabled, and a reminder will appear on the dates line:

Getting Stuff Into Caboodle

I wrote the following for a new page of the Caboodle User Guide, but since nobody reads such guides :) I thought I'd post it to the Dejal Blog, too.

Caboodle is a versatile application, and a handy place for storing text, pictures, PDFs, and other kinds of documents.

The most obvious way to get stuff into Caboodle is to type text or paste content into an entry. Simply click the New Sibling toolbar button (or choose it from the File menu) to add a new entry a the same level as the selected one (or the top level if no selection), or the New Child option to create the new entry within the selected one. Read about the main Caboodle window for more information.

You can also drag documents into an entry. Create an entry as above, then press Cmd-Tab to switch to another application or the Finder and begin dragging the document (e.g. an image from a web browser, or PDF from the Finder). While the mouse button is still held down, press Cmd-Tab again to switch back to Caboodle, and drag into the text area. You then have a choice: you can copy the document into Caboodle, simply by releasing the mouse, or alias the original into Caboodle by holding the Control key while releasing the mouse button — the mouse pointer will change from a plus symbol to an alias symbol.

That sounds hard, but is actually really easy once you try it. But easy as that is, wouldn't it be nice if there were an even easier way to get stuff into Caboodle? You're in luck: we're not done yet!

Caboodle supports the Services menu, which is included in the application menu of most modern applications. Simply select some text in pretty much any application then choose the Services > Caboodle > Add Entry with Selection command. Caboodle will be launched if it isn't already running, a new entry will be added, and the text will be inserted in that entry. What's more, the Subject will be set to the first few words of the first line of text. If the selected entry has child entries when using this function, the new entry will be a child of that one, otherwise it will be a sibling.

(It's worth pointing out here that there's a second command in the Services menu: Selection From Entry. This command does the reverse of the above: it inserts the text from the current entry in Caboodle into another application at the current selection.)

But wait, there's more. You can even drag text or images onto the Caboodle application icon in the Dock to quickly add them in the same way as for the Services feature.

Finally, if you need to get lots of data into Caboodle, you can import it.

Simon tip: check and notify with Twitter

Version 2.4 of Simon, my website and server monitoring tool, added a plug-in to support the popular Twitter service — where short messages can be posted to tell your friends and associates what you're up to throughout your day.

The Twitter plug-in in Simon works both as a service, that a test can check, and as a notifier to alert you to events for any tests. It was kindly written by Daniel Ellis.

When used with a test, you can monitor Twitter updates, direct messages, friends (people you follow), followers (people who follow you), and more. This is handy to simply track when Twitter is down (or experiencing the "fail whale"), or learn when someone un-follows you, or other events:

A key benefit of Simon is its notifiers, which alert you via email, sound, speech, and more when something interesting happens with a test. Now you can also post an update (public message) or direct (private) message to Twitter. If you're an avid Twitter user, Simon can keep you informed right in your Twitterfeed.

As with a number of other notifiers, you can include custom text in your tweet, including variables for the test name, the kind of event, the date and time, the URL, and much more:

Learn more about using Twitter as a service and notifier via the Simon User Guide.

I have a special Twitter account for Simon notifications, which alerts of Dejal blog and forum posts and comments, and a few other events: the SimonBot. You're welcome to follow it to hear about new blog and forum posts, if you wish.

I also use Twitter myself; you can follow me for insights into my life.

Scripts for Simon: email on counter change; get screenshot of website

One of the major strengths of Simon, my website and server monitoring tool, is the flexibility it offers through the ability to write custom scripts in many scripting languages. Simon is plenty useful with the built-in services and notifiers, but the ability for customers to enhance it themselves makes it even better.

Recently, two notifier scripts were added. Notifier scripts enable you to provide new ways of being alerted to changes, failures or recoveries of tests.

Firstly, a useful Ruby script called "Email on Counter Change", to notify you via email when a numeric value changes. It was kindly written by a Simon customer, Wade Maxfield. He wrote it work with the output of the MySQL service, though it could be used with other services, and/or customized for different behavior. He describes it thusly:

Parses the results of the test for name/value pairs and then notifies by email if any of the values differ by more than the warningThreshold since the last check. Use a negative number as the warningThreshold if you want to check for values that decrease over time. For use with the MySQL service, and queries like SHOW global status WHERE (variable_name LIKE "Qcache%")

Requires Simon 2.4.1 or newer.

As an example: Set up a Test and Notifier to check if MySQL has restarted. For this test we will check the value of the Uptime status variable in MySQL. Since it shows the current uptime in seconds, it should not decrease, if it does send a notification email since MySQL must have restarted.

In a MySQL Service test set the Server, Port, Database and Security values to whatever are required to connect to your MySQL server, then set the Query to SHOW global status WHERE (variable_name="Uptime"). Add Notifiers for Change and Failure, and set both to use the Notifier you have setup with this script.

In the Notifier, set the mail options as needed. Set the warningThreshold to -1, then if the Uptime variable is ever lower that the previous check, MySQL must have restarted, so this script will send the notification email.

Secondly, I wrote a very simple notifier script called "Show & Screenshot" in answer to a forum query:

Opens the page in the default web browser, waits a few seconds for the page to render, then takes a screenshot of it. Enter the path of a folder to save them to (the folder must already exist). Also specify how long to wait before performing the screenshot, in seconds.

You can download these scripts and much more via the Notifier Scripts section of the Simon Extras page.

Enjoy! And if you create a useful script for Simon, please share it with others!

Simon tip: Preview

Dejal Simon version 2.4 was recently released, and a few of the changes in this version related to the Preview window. This window may not get much love, so I thought I'd devote a tip blog post to it.

As you know, Simon is a website and server monitoring tool. This mouthful is to try to describe two of the levels that Simon operates at. At the very basic level, Simon is a very simple utility to watch web sites, and let you know when they change or go down. But Simon has much more depth to it — it enables you to monitor all sorts of internet servers and services, local applications, local and remote disk volumes, and more.

The Preview window has this duality, too. When used with a web-based test (i.e. one using the Web (HTTP) service), it displays the HTML source at the top of the window, and the rendered web page and graphics in the bottom, with a URL field, Back/Forward buttons, and more, and links etc are fully functional:

Preview for web

This is really handy, both to quickly see the page while in Simon, without having to switch to a web browser (which is easy too, via the Visit Site command), and when setting up the test in the first place.

One of Simon's key features is the Smart Change Detection function. This is a section of the Edit Test window, where you can tell Simon to only look at the HTML source between two blocks of text. This enables you to focus on the part of the page you care about, and avoid dynamic portions like banner ads etc. You can easily set this up via the Preview window. With the Edit Test window open, after entering the URL, click the Preview button to display the preview of the page. Then search through the HTML source for the start text, select it, and click the Copy to Test toolbar button. This will copy that selected text to the Start field in the Edit Test window. Then you can find and select the end text, click the button again, and it's copied to the End text field. Easy!

Smart Change Detection

As useful as this is, it's not done yet. The Preview window is also supported by many other services, in a slightly different way. For non-web services, the Preview window looks a little different. Instead of the HTML source, it displays a summary of the service operation at the top (e.g. the script), and the output at the bottom. This is all plain text, since that's what these services deal with:

Preview for others

These services support the Smart Change Detection feature, too: just like with web pages, you can select text and click Copy to Test (or copy manually) to set up the Start and End text blocks. Unlike web, you can do it from either the source or output areas (and choose those as options in the Smart Change Detection section).

The Script- and Port-based services already supported this mode, but version 2.4 extended it to include the Application and Ping services, too, along with the new Twitter service. So you can now see more information about exactly what's going on with the Ping checks, and more information about the other services. Version 2.4 also made the Preview window more responsive for this mode, showing the source script immediately, instead of after the check is complete, so you can see what it's doing.

I hope you'll use the Preview window to good advantage when configuring and using Simon.

Caboodle tip: add entry from text in another app

Caboodle is my handy snippet keeping app: as a blogger wrote recently: "Lean, clean, snippet machine to store information on your Mac."

One of the essential features of any snippet keeper is getting information into it, and Caboodle has a number of options, including direct entry, imports, and a handy Services menu command. This sub-menu is found within the application menu of modern Mac apps, and includes useful operations you can perform on selected text using external applications.

If you want to add some text to Caboodle from a web browser, word processor, text editor, or just about anywhere, you can simply select the desired text and choose Services > Caboodle > Add Entry with Selection. Caboodle will be launched, if necessary, and the selected text will be added to a new entry.

If you do this a lot, you might find it more convenient to assign a keyboard equivalent to the command. To do so, follow these simple steps to add the equivalent of your choice to the Add Entry with Selection command:

  1. Open the Keyboard & Mouse system preferences.
  2. Go to the Keyboard Shortcuts tab.
  3. Click the "+" below the list.
  4. Select Application: All Applications.
  5. Type Menu Title Add Entry with Selection (exact wording and case is important).
  6. Press Keyboard Shortcut Cmd-Option-Ctrl-C (or a shortcut of your choosing).
  7. Click Add.
  8. Launch a new application that supports Services.
  9. Select some text, press Cmd-Option-Ctrl-C, and it appears as a new entry in Caboodle.

Note: the new keyboard shortcut won't show up in applications that are already running until after you quit and re-launch them.

Use Narrator to read interviews

My German localizer, Ulf Dunkel of DSD.net, recently suggested an excellent use for Dejal Narrator. The app was designed with reading out stories using multiple voices in mind, but it's certainly not limited to that. Any text that includes multiple people is a good candidate.

One common case when people are conversing is a web interview. The format is pretty standard: each paragraph represents something one of the participants said, and is prefixed with their name or initials. Narrator's Casting Assistant feature recognizes this format, making it very easy to mark up the text.

When you find an interview you'd prefer to listen to, rather than read — perhaps just so you can rest your eyes, or maybe you want to listen to it on an iPod — you can easily use Narrator to read it out, with different voices for each of of the participants.

Here's how:

  1. Select the interview text in the web browser (e.g. this Macworld interview on iPhone gaming, or this Phorum interview).
  2. Choose Services ▶ Narrator ▶ New Document with Selection from the web browser's application menu.
  3. In Narrator, edit the names at the start of paragraphs, if necessary, to make them consistent (sometimes the first usage is a longer name).
  4. Choose Director ▶ Casting Assistant... (or click the toolbar button).
  5. Click Cast to have Narrator add Characters for the participants.
  6. Change the Actors' voice attributes, if desired.

That's it! You can then export to iTunes if desired, or listen directly in Narrator. A great way to enjoy an interview while doing other activities.

Simon on your iPhone, APC notifier, and more

One of the nice things about Dejal Simon is its flexibility. Not just in the wide range of website, server, application, etc monitoring services and notifiers, but that it can be extended by anyone, not just me.

As you may know, I have a page on the Dejal site devoted to such extensions, the Simon Extras page. Newly contributed services, notifiers, and reports tend to get bundled into the application in the next feature release, but you don't have to wait — you can download the new goodies now. In fact, existing customers need to do so to get them, as the bundled ones are only visible with the default data install for people first trying Simon (I have plans to improve that situation in the future via an enhanced update mechanism).

Here are some of the recent offerings:

  • iPhone: A report template to display reports on an iPhone or iPod touch (try it yourself with a live demo: point your iPhone at www.dejal.com/simon/iphonedemo):

    iPhone demoiPhone demo

  • APC Masterswitch: A notifier script to restart an outlet on an APC Masterswitch with Network Management Card v2.6.1. This has been requested by many others, so I'm sure will be much appreciated.
  • TCP Port Scanner: A service script to check all TCP ports on a server, to identify which are open.
  • Network Time (NTP): A service script test that an NTP server is responding.
  • Incoming Mail (POP) via SSL: A service script test that a POP3/SSL server is responding.
  • Port Available: A service script like the Port services, but simply checks if a specified port is open, without actually communicating on it.

Visit the Simon Extras page to download these and other handy goodies.

Simon tip: automatic offline support

One "hidden" feature of Simon is how it handles the situation when your computer loses its internet connection.

People sometimes ask me what Simon does in this situation, concerned that it would count as a failure for tests. Simon is smarter than that, though. Every time it starts a check, it first checks if the computer has a current internet connection, and only then performs the check.

If it determines that your internet connection has been disrupted, it places the test in an "offline" state, where it shows a blinking "lightning bolt" for the status icon until the connection is restored. This offline state doesn't count as a failure (or success).

Simon works out if you have a connection by seeing if it can resolve one of two popular domain names; if either work, your connection is probably fine, but if both fail, it is likely disconnected. Using two domains avoids a temporary outage of either one.

From version 2.3 onwards, you can disable this internet connection check on a per-test basis via the new Can check when offline checkbox in the Edit Test Checking Options. This is useful if you want to create a test to notify you when your connection goes down, or for tests that don't require an internet connection (e.g. using the Application or Script service plug-ins).

Test Options

Caboodle tip: alias a file instead of copy it

A quick tip for Caboodle, from the FAQ:

Normally when you drag a file into a Caboodle entry it copies it, allowing you to delete the original. But often you want to keep the original in place too, and want to avoid bloating Caboodle's data with large files (or folders).

The solution is to hold down the Control () key when dragging the file or folder to the Caboodle entry: the mouse pointer will change to include an alias symbol instead of the green plus. It will then make an alias (link) to the original. Then when you double-click on the file (or view it inline for images and PDFs), the original will open. Of course, in this case you shouldn't move or delete the original file.

Simon tip: shortcut for entering test URLs

The Web (HTTP) service is the most popular one for tests. So I thought I'd share a helpful tip with adding them.

When entering the URL, you can use very minimal text, and Simon will fill in the remainder when you click OK. It automatically adds the default protocol ("http://") and the "www." and ".com" if necessary.

For example, if you type "apple" (without the quotes), it will be saved as "http://www.apple.com/". Similarly, entering "dejal/simon" will end up as "http://www.dejal.com/simon/".

Web (HTTP) test

Simon tip: notify via email

I recently received a question from a potential customer, asking whether Simon has the ability to send a notification via email.

Although I do mention it in a number of places, this wasn't an unreasonable question, particularly if you just download Simon and start playing with it, as no email options appear in the list of available notifiers in the Edit Test window by default.

Why is this? Because unlike the Speech and Sound notifier plug-ins, the Email one requires some configuration before it can be used, so it can't be offered by default.

The way notifiers work is (I hope) pretty intuitive, but a little indirect. Simon provides a number of notifier plug-ins that do the work of notifications, and you configure notifiers to use those plug-ins, then choose notifiers for each test.

These levels of abstraction allow easy re-use of notifiers: a single plug-in can be used by multiple notifiers, and a single notifier can be used by multiple tests, without having to set up the same things over and over again.

For example, you can add an email notifier to yourself for some failures, another email notifier to your clients for other failures, another one for recoveries, and so on, and use whichever ones of those are desired in tens or hundreds of tests, as required, as simply as choosing them from a pop-up menu.

Test Notifiers

So, as I said, there is no email notifier set up by default, since it needs configuration, but you can easily add one. If you're editing a test and realize that you want to receive an email or SMS when this test changes, fails, and/or recovers, you can click the New Notifier... button in the Notifiers section of the Edit Test window, which will open the New Notifier window. You can then choose E-mail from the Notifier Kind pop-up menu, and the controls below will change to those for the email plug-in:

Email Notifier plug-in

You can then configure the email, and save the notifier, which will be available for that test and any others you want to use it in. Easy!

Simon tip: detect unacceptable changes

Simon's Smart Change Detection feature looks for the text in the Start text box, then the End text, then compares the text between those two against what it had the last time it checked.

This is useful to detect changes in a portion of the page, but can also be used to detect unacceptable changes.

The usual way to do that is to just provide a Start text block, and not an End one. Then if the Start text isn't found, that is a failure.

So for example, if you do a telnet Script-based check, you'd want it to be considered a success only if this is output:

Escape character is '^]'

So you'd put that in the Start text block, and leave the End block empty.

Then if that text isn't found (as would occur if telnet couldn't connect to the server), Simon will log a failure.

Syndicate content