Hi, this is Robert Statsinger. I'm a Foglight Solution Architect. Today, I'd like to show you how to create and deploy a Foglight script agent. In Foglight, you can take a script written in almost any language, such as the Unix or Linux Shell, a Windows' batch file, or even something like a Perl script, and with a few simple modifications, you can turn it into a deployable Foglight agent.
A script agent in Foglight can be deployed on any running agent manager that's compatible with a platform where the script was written. For example, I have here a Linux batch file script that is in this case collecting some metrics from the Linux operating system concerning the number of forks and interrupts that the kernel performed since the last reboot.
Now this is a simple example. But you could use in this area of the script any kind of data collection mechanism. You could call a third party client or any kind of a program that collects data that you need. The bottom part of the script here produces a few simple echo statements to the standard output which is all the simple formatting that's required to turn this into a deployable Foglight agent. So I'll run the script here from the Shell one time so you can see what its output looks like. And that output will have meaning once we deploy this to the Foglight framework.
So here's my Foglight user interface. And I'm going to go to the administrative tooling area, to the script agent builder. And I'm going to browse to the Shell script I just showed you. And I'm going to import this Shell script into Foglight. and I'll say build script agent. And I will tell Foglight that I want to submit this as a script agent. And it will build it into a deployable agent. It will now allow me to go to the agent status screen where I can use the standard administrative workflow to deploy this agent.
So, first, of course, I'm going to create an agent package. And I'll deploy this agent package to my running agent manager on this host. And I'll select the Kernel metrics agent which was the name of my script agent. So now Foglight is going to deploy that script as an agent to that agent manager running on this Linux host. And now it will let me create an instance of that agent. Again, this is just the standard administrative workflow for creating an agent.
And I'll say create. And now Foglight is going to create a runnable instance of that script as an agent on my Linux host here. And, of course, this agent has a simple set of properties. For example, if I wanted to, I could see the properties of this agent, and I could do things like change the execution frequency and so forth of this agent. But for now, I'm just going to go back, and I'm going to activate this agent.
So now every minute, Foglight is going to execute that script and collect the data on forks and interrupts from the operating system and send them up to Foglight as metrics just as if they were collected by any other agent. Now the easiest way to see this data is to put up a little quick custom dashboard. So I'll create a little dashboard here. And I'll call my dashboard Kernel Metrics. And I'll select a fixed format free form dashboard. And I'll say Finish.
And now I will open the data tree inside of Foglight. And I will go into the management server tree where all the agents are running. And I can see here in this tree my Kernel Metrics agent. And I can see the agent tables containing the data that it is submitting. And I have here the forks data. And I have here the interrupts data. And I'll just put them on a graph here together for you.
So you can see that this script agent is starting to send up metrics to Foglight just as if they were collected by any other agent. So that's really all there is to it. You can learn more about script agents from the online help inside the Foglight UI. And you can learn more about Foglight in general by going to software.dell.com/foglight.