Telegraf - Service monitoring 'template'
Manually adding windows services to monitor via the Ops UI can be very high touch/time consuming and if you have a typical environment that has repeat footprint and duplicate monitoring requirements (multiple SQL and Backup server for example) adding the same set of services from a template can be a life saver.
There's a few handy scripts in this one - described below :
1. A script to export all windows services and names to a .csv file (that you can then edit - backup server csv, domain controller csv, file server csv etc.)
2. Script to 'import' the required .csv for enabling 'service' monitoring for the required VM.
Usage :
1. On a server you wish to 'template' - use the CSV export script to export all running services details into a file you can edit so that it only contains the required services that your SLA's (etc.) need for monitoring on a server. (SQL engine and SQL backup services for a SQL server etc.) - Save this as your 'SQL' monitoring template for example.
2. Import the 'template' you need for each named VM so that you can cookie-cutter the exact same service monitoring for each of these servers. (script requirements below:)
Username
AuthSource
Password
Ops URL
Source CSV
VM name with a running Telegraf agent
One the import is completed you'll see that the services have been added to the telegraf 'services' section of the Telegraf page for each VM, if you have many servers that need the same monitoring this can save you a lot of time.
Jump on over to my GitHub repo here for the script.
Feel free to edit/adjust as needed!
Comments
Post a Comment