Monitor Iguana instances and produce graphed results

Iguana Monitor is an easy-to-deploy utility that monitors any number of Iguana instances and reports on their health with automatically-generated graphs. For every specified Iguana instance, Iguana Monitor records the results of a “monitor_query” request in a SQLite database. The information is then plotted automatically, producing an interactive graph like this:

The following metrics are included:

  • Virtual Memory Usage
  • Resident Memory Usage
  • Open File Descriptors
  • CPU Usage (%)
  • Disk Usage (%)

The above information can be graphed for an arbitrary period of time (daily by default). In addition, multiple instances of Iguana can be represented on any given graph.

Step 1: Organize the source files

  1. Download the following three files:
  2. Create the following directory: <Iguana install directory>/plotter
  3. Unzip jquery.zip into this new folder, resulting the following: <Iguana install directory>/plotter/jquery

Step 2: Adjust Iguana Settings

  1. Launch Iguana and from the Dashboard, click the Settings tab.
  2. Click the HTTP(S) Channel Settings button:
  3. In the window that appears, click the Edit button.
  4. Enable the Serve Files From a Directory setting, and in the Directory for Files field, browse to and select the new directory: <Iguana install directory>/plotter
  5. Click the Apply Changes button.

Step 3: Create the ‘Monitor’ channel

This channel queries metrics from the specified Iguana instances and records that data in a SQLite database:

  1. Return to the Dashboard and click the Add Channel button.
  2. Select the following components:
    • Source = From Translator
    • Destination = To Channel
  3. Click the Configure Channel button. The Configure New Channel window appears.
  4. In the Channel tab, enter the following:
    • Channel name = Monitor
    • Description = Query metrics from specified Iguana instances and send results to SQLite database.
  5. In the Source tab, set the Poll time value to 18000000 (5 minutes). 
This value can be anything, but we recommend no lower than 1 minute.
  6. We are going to leave the other channel component settings as their defaults, so simply click the Add Channel button. The channel is created and several warnings appear. Don’t worry! This is just Iguana reminding us that before we can run the channel, we’ll need to commit at least one milestone. We’ll perform this step shortly.
  7. In the Source tab, click the Edit Script hyperlink to launch the Translator.
  8. In the dialog that appears, select Import project from zip file and enable Import sample data.

  9. Click the Choose File button and browse to select the Monitor_From_Translator.zip project file that you’ve just downloaded.
  10. Click Import. Iguana loads the project into the Translator.

Step 4: Add credentials to the ‘Monitor’ channel

  1. From the Project Files panel, click the ‘instance_list’ module to open its contents:
  2. Modify this script with the correct credentials for the various Iguana instances that you wish to monitor. You can add additional Iguana instances by appending additional rows to the table:
  3. Remove any empty, unused instances from the script.
  4. Return to the Dashboard and click the Start/Stop button to run the channel.

Step 5: Create the ‘Plotter
’ channel

In response to a web request, this channel queries the SQLite database (previously populated by the ‘Monitor’ channel), creates a time-series, then plot graphs of this data.

  1. Return to the Dashboard and click the Add Channel button.
  2. Select the following components:
    • Source = From HTTP(S)
    • Destination = To Channel
  3. Click the Configure Channel button. The Configure New Channel window appears.
  4. In the Channel tab, enter the following:
    • Channel name = Plotter
    • Description = This channel produces data and plots graphs based on the results of the Monitor channel.
  5. In the Source tab, enter the URL path as “plotter”:
  6. We are going to leave the other channel component settings as their defaults, so simply click the Add Channel button. The channel is created and several warnings appear. Don’t worry! This is just Iguana reminding us that before we can run the channel, we’ll need to commit at least one milestone. We’ll perform this step shortly.
  7. In the Source tab, click the Edit Script hyperlink to launch the Translator.
  8. In the dialog that appears, select Import project from zip file and enable Import sample data.
  9. Click the Choose File button and browse to select the Plotter_From_HTTPS.zip project file that you’ve just downloaded.
  10. Click Import. Iguana loads the project into the Translator.
  11. Commit your first milestone.
  12. Return to the Dashboard and click the Start/Stop button to run the channel.

Done! To query the new Iguana Monitor interface and see your work in action:

  1. Return to the Dashboard.
  2. Hover your mouse over the Plotter channel’s source component.
  3. In the tooltip that appears, click the URL Path hyperlink provided:

Leave A Comment?