Back to Geneos FAQ

Gateway - Is there a way I can receive email updates with screenshots of my dataviews?

This article provides a method with a Gateway rule to launch a Perl script which captures a dataview from Webslinger. For users with newer Gateway versions, please refer to Gateway snapshot function (GA5.14 and above).

Setting up Webslinger Copied

  1. Obtain a copy of the Webslinger binary.
  2. Upon extracting and untaring the binary, you should have the following files:
  1. Modify the Webslinger setup file.
*****
***  WEBSLINGER setup file
*****

*** List of Gateways to connect to.
*** One line per Gateway.
*** Port should be the Gateway's EMF2_PORT.

*** This is for a single Gateway
GATEWAY = 192.168.100.94:888

*** Multiple Gateways may also be added by separating
*** the addresses with a comma
GATEWAY = 192.168.100.94:9370 , 192.168.100.82:9370

*****

*** The port to listen for browser connections on.
*** The default listen port is 8888.
LISTEN_PORT = 8899

*****

*** The view path to use.  This will determine the directory structure
*** to group the ManagedEntities by.

VIEW_PATH = COUNTRY, TOWN, SYSTEM

*****
*** How often to automatically refresh the pages.
*** Main refers to the page with the tree showing the ManagedEntities.
*** View refers to the pages that display the actual data in table form.
*** These do not apply to PDAs.

MAIN_REFRESH_RATE = 5
VIEW_REFRESH_RATE = 5

*****
  1. Run the Webslinger binary (for example, /webslinger.linux &)
  1. To view your Webslinger, open a browser and in the URL, type http://<host\_name>:<port\_number> (for example, http://192.168.100.94:14501)

A dataview shown in the Webslinger and the Active Console respectively:

Geneos Webslinger dataview

Geneos Active Console dataview

Configuring an action that runs the Perl script Copied

  1. Create an Action.
  2. In the Executable field, indicate the full path of the script.
  3. Define eMail as the email recipient as a variable in the Managed Entity.

Geneos script path in executable field

Configuring a rule to fire a Perl script Copied

  1. Open the Gateway Setup Editor.
  2. In the Rules section, create a new Rule.
  3. Select the target cells and then add the body of the rule to the Block portion.

Geneos rule block for fire email rule

Note

Dataview Emailer is the action previously created that runs the Perl script.

Modifying the Perl script that captures the data from the Webslinger and sends the email Copied

  1. Edit the email\_ws.pl script as found in the gateway-email-action repository.
  2. Modify the $webslingerHost details to the server that Webslinger runs on plus the port.
  3. Modify the my @attributes to the attributes as set in the VIEW\_PATH in the webslinger.setup.

After configuring the Webslinger, action, rule, and Perl script, you should end up with mail sent to your email address when your rules are triggered. See sample screenshot of the generated email below:

Geneos sample email from fire email rule trigger

["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?