We haven't added voice command to Foglight yet, but we can still get Foglight to play some tunes.

I setup a small monitoring environment with a Foglight Management Server in a public cloud. I put a local Foglight Agent Manager on my laptop to talk to it, and deployed the Windows agent to monitor it. I immediately got Memory Utilization alarms. 

An easy way to get to the rule editor is to bring up the alarm, go to the Source tab, and click Edit. I was getting warning severity alerts, so that's what I'd use to add an action. A RemoteCommandAction was added on "Entering" the alarm state, which means when the alarm at that severity is first raised.

This action takes 2 mandatory parameters: a command line to execute and the hostname on which to execute.

For the command line, it's best to test the command on the host(s) that you want it to run on first. Then, paste it into the User Defined option dialog, and select Change.

For the HostName parameter, there is a pre-set Rule/System variable named "foglight_monitored_host_name" which is pretty self-explanatory. Select it and then Change.

The settings should look similar to those below. Click "Save" to commit the changes.

Yes, this is a simple example. I probably would want to expand on it to limit to "Windows" hosts, etc. Maybe even create a simple rule that fires on an alarmsystemevent, which then has logic for "os.type = 'Windows'" and which fires for specific alarms and severities. Etcetera.

Here it is in action. It only took ~ 50 takes to get the timing (almost) right. The alarm actually fired before the dashboard refreshed.. 

For more information on Foglight, you can click here.

And here's the link to the Youtube video - https://www.youtube.com/watch?v=Y-q8Gtr4coM

Anonymous
Related Content