[techno music]
>>In this video, I'm going to guide you
through the steps to create a new application template.
To begin, open Settings from the menu bar,
then click on SAM settings.
Under Application Monitor Templates
click Create a New Template.
I'm going to create a template to monitor
a custom in-house application.
Click on Add Component Monitors to view a list
of the component monitors available.
When you go to create your first template,
you'll first need to know what from that application
is important to monitor,
and how you can get at that information.
For example, does this application have a database
that you could pull data from?
If it runs on a UNIX system, can you run a script
to poll information?
If it runs on Windows, are services you can monitor?
What about event logs?
Are there specific ports that need to remain
open for this application to function properly?
Server and Application Monitor offers
almost 50 different component types,
each with a different monitoring function
that you can use together to get the data you need
to monitor you applications.
The trick is to determine which components
match your requirements.
To create your template, use the check box
and select each component monitor you'd like to add.
You can add as many components as you like to a template
and you can adjust the quantity field by clicking on it
to add multiples of a component type.
For instance, this could be used to monitor
more than one TCP port, or more than one service
for your application.
For this custom application template
I'm going to add a Windows event log monitor
to check the Windows event log for the application's
Backup Complete event.
To check if the application web portal
is available for users to log into,
I'm going to use an http form log in monitor.
I'm going to add a second Windows event log monitor
to check for critical and warning events
generated by the application.
Finally, the application runs using two services,
so I'm going to add two services monitors to cover them.
Now that I've got them selected, I'm going to click Add
and start configuring them.
My first Windows event log monitor is going to check
to see if the Backup Complete message has been logged
to the Windows event log each day.
I'm going to set the credential for monitoring
to Inherit From The Node.
That way, when I apply this template to my servers
I won't need to manually set the credentials
on each of them.
You have the option here to poll via WMI or via RPC.
For this example, I'm going to stick with WMI.
The message I'm looking for will be logged
to the Windows application event log,
so I'll leave that set to default as well.
I'm now going to set the match definition to Custom
so that we can define our criteria.
The message we're looking for is
an information level message that states
"Backup completed successfully" once a day.
We want this monitor to show down if it wasn't logged.
I'm going to set the event type to Information.
To match the specific event, I'll enter the keywords
I'm looking for between quotes
to define them as a single string.
Now I need to define how many event logs
we're going to check.
We need this to fail if it's not seen every 24 hours,
and by default this template will poll every five minutes.
There's 288 five-minute intervals in 24 hours,
but we want to leave some leeway
in case the backup takes longer than usual.
So I'll set this to 300 to give it an extra hour
to complete the backup.
Finally, we need to change the component to show Down
only if the event is not found.
I'm going to set "If a match is found in a polling period
"component status is to up."
My second Windows event log monitor will be very similar.
Again, we'll need to inherit credentials
and poll via WMI as before.
This time, my match definition will change
to looking for Error or Warning event types.
At the top here, I'm going to define the log source
to match the application source name seen in the event logs
because I don't want warning or error messages
from other applications on this server
causing this component to fail.
This time I want the component to fail
if we do see event messages of this type,
so I'll leave this set to the default of Down.
Next in the list are my service monitors.
These are pretty quick to define.
The trick to service monitors is to make sure
you're using the net service name,
not the display name for the service.
You'll find the net service name
when you open the services properties.
I'm going to add the service name here.
Again, we're going to inherit credentials
for the service monitors because it will
make the template really quick to apply to my servers
if I have multiples of the same application
in my environment.
Because I'm not sure yet of the thresholds
I'll need to set for this, I'll leave them as default
and allow SAM to calculate the thresholds
based on the baseline data it collects.
I can always come back to adjust these again later.
Service monitors themselves are all very similar to define,
so to save repetition I'll set the second service monitor
to Disabled for now, and come back to it later.
Lastly, my custom in-house application
has a web portal piece that users log into.
Instead of just testing that the http port is available,
I want to test that users can bring up the log in page
and successfully log in to the application.
The credential for monitoring this
will vary from server to server,
so I can't define a single credential
that can be used for all.
For now, I'll set the credential for monitoring to None,
and when I go to apply this template to my servers
I'll need to go in and manually assign
the correct credentials to use
for that particular application instance.
If you need to, you can adjust the port number
if your website is hosted on non-default port.
For the URL of the website, the IP variable
will be inherited from the node this template's applied to.
It's not a great idea to set this to a specific variable
during the template phase, as each server
will have a different IP for their website.
If the website IP is the same as the host IP,
then the variable can be left just as it is.
But if the website will be hosted with a different IP,
it would be best practice to set that IP address
when you apply the template against a specific node,
setting the IP correctly for that node at that point.
If you need to set a proxy server up for traffic
to these servers, you can do so by enabling Use Proxy
and by defining the proxy IP here.
Whether or not you'll want to define the proxy
at the template level or at the application level
will be dependent on your environment setup.
The key items to fill in for an http form login monitor
are the tags used to define the form in HTML.
If they're not standard names, you may need to scan
the HTML code of your application to determine
what these should be set to.
The login form keywords refer to the form
definition tag in HTML.
Common key words are defined here by default,
but if your form is named differently
you'll need to add the keyword here.
For this form, I'm going to add Logon as a keyword.
Keywords are added between parentheses,
and multiple potential keywords are separated
using the vertical bar character.
Login control keywords and password control keywords
refer to the form tags used to define those
HTML form entry text fields.
Again, the commonly used keywords are defined here,
but if your form uses something different
you'll need to add your own keywords here.
You'll also need to define the text
you expect to see on the page when the login fails
and when the login succeeds.
If you find your monitor starts telling you
the phrase cannot be found, then it's possible
that within the HTML code itself
the phrase you're testing for may have
HTML code breaking it up, or maybe split across two lines.
The SAM monitor will be testing against
this returned HTML file, not the displayed page,
so if the phrase has been broken up
you'll need to account for that by using
pattern matching regular expression.
Finally, you'll need to define response time thresholds
to define exactly how long you think it should take
for a user to initiate a login, and login successfully.
There are a lot more component monitors available to use
for monitoring your applications,
other than the ones covered in this video.
For more information on how to configure them,
consult server and application monitor documentation
at support.solarwinds.com.