|Name||Windows Service Discovery|
One of the most common and repetitive tasks in Operations monitoring implementation is Windows Service Monitoring. The involved tasks are usually:
and then copying/pasting/renaming monitors... this lets lots of space for mistakes to creep in.
To workaround all these issues, we created an advanced monitor that actually generates exportation files containing other monitors. This is how it works:
To use these configurations, unzip the attached file in the ThinkServer installation folder (the folder AutomaticGeneration should be directly in the ThinkServer folder). These configurations use several concepts:
This is what it would look like in real life:
1. import the generator for Service Discovery - you may need to update the datasource to point to the server you are interested in (this monitor can easily be migrated with the MigrateConfigurations Utility if you think it is necessary). When you start it, id gives the following message. (it is important to configure the datasource properly as the generated monitors will also use that datasource):
it is the "Preview" mode, that is, it just tells you what it is going to do, and is not generating anything so far. (in the current configuration, it only lists the services that are configured with Automatic start and are currently started)
2. if that's ok for you, you can switch to "File generation mode", setting True in the Additional Parameters tab:
3. restart the monitor: it is now creating the exportation file, based on the template:
4. A file has been created in the AutomaticGeneration folder
5.You can import it in ThinkServer, selecting only the services you are interested in
It is extremely important to check the options "Reuse datasources" and "Do not overwrite data sources", as the generated monitors need to use the datasource of the generator
6. That's all!
These monitors are based on a template for services monitor. If you want to create your own template (with customized health rules, or customized messages templates, or different name conventions for the monitors' names), here is the procedure:
1. create a Windows Single Service Monitor that suits your tastes
2. Once this is done, put in the "templates placeholders", that will be replaced at monitor generation times in the Monitor Name and in the Monitor Description.. it might look like this:
%(HostName)s - Service "%(ServiceDisplayName)s" (%(ServiceName)s)
3. in the service filter, type in %(ServiceName)s
4. Once you are done, export the monitor (I suggest that the file should be called something like whatever.template.exp)
5. Edit the file with a text editor (Notepad ++ indeed), and modify the DataSource Name and Description to put in the DatasourceName placeholder:
6. update the Service generator to use that new template:
7. That's it!
Automatic Service discovery should work pretty well with Auto-provisioning configured in the SmartConsole! The same approach could be used for Windows Process or any kind of monitor...
Still have questions? We can help. Submit a case to Technical Support.