blësk Lite for Windows is a lightweight program that is great for situations where blësk can’t access the Windows machines, but the Windows machines can access blësk. The communication is initiated by the Windows client (passive mode) over a HTTP or HTTPS (SSL) port on a regular interval.
1. Start by downloading a copy of the lite agent from this link
2. After unzipping the archive on your Windows server, you should have two executable files and the folder containing the plugins for the agent.
Note: Use the executable version of the lite agent that matches your Windows architecture (64 bits, 32 bits). Double click on the file to start the installation.
3. Accept the software license agreement.
4. Now it’s time to add the information’s about your blësk server.
Note: You should use the http protocol. The https protocol isn’t tested yet.
5. After you have entered all of the information, press the “Next” button.
On the next screen keep the two components selected then press “Next”. The first selected component will create the configuration file and the second will add the Windows task needed to automatically send the collected information to the blësk server.
6. On the next screen, Keep the default destination folder and click “Install”.
7. Wait for the installation process to complete then click the “Close” button.
8. Go to the Task Scheduler and verify if the task was created. The name of the task should be the FQDN of the server on which you are installing the agent.
The agent uses plugins to gather information such as used disk space and the like. Therefore, we need to copy the plugins that the agent will use into corresponding directory and add the required plugin command lines to the appropriate section of the configuration file.
1. Open the folder plugins located under “C:\Program Files\Nagios\NRDS_Win\config” (if you kept the default installation folder).
Note: This is where we’ll paste the plugins needed in order for the agent to work.
2. Now go to the agent folder that you had previously unzipped and open the “Plugins” folder.
3. Copy all plugins from the “Plugins” folder to the “C:\Program Files\Nagios\NRDS_Win\plugins” folder.
You can tell the agent how to use the plugins by adding some new command lines to its configuration file. Each command informs the program how to use the plugin, and each plugin has a specific function.
Edit the configuration file at “C:\Program Files\Nagios\NRDS_Win” using administrator permissions. You should see something like the following:
1. There are three sections in the configuration file: [settings], [services], and [extensions]. We need to add our commands (as shown below) to the [services] section of the config file.
command[__HOST__] = .\plugins\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400,80%
command[Win_Processor_Load_Passive] = .\plugins\cpuload_nrpe_nt.exe 70 90
command[Win_Used_Disk_C_Passive] = .\plugins\check_pdm.exe --disk --drive C: -w 90.2 -c 96.4
command[Win_Used_Physical_Memory_Passive] = .\plugins\check_pdm.exe --memory -w 94 -c 99
command[Win_Used_PageFile_Passive] = .\plugins\check_pdm.exe --memory pagefile -w 92 -c 98
#command[Win_Event_Viewer_Passive] = .\plugins\eventlog_nrpe_nt.exe -m 7200
command[Win_DNS_Client_Passive] = .\plugins\service_nrpe_nt.exe "DNS Client"
command[Win_Time_Client_Passive] = .\plugins\service_nrpe_nt.exe "Windows Time"
command[Win_Running_Processes_Passive] = .\plugins\check_winprocess.exe --warning 90 --critical 110
The commands are composed of three parts: “Command Name”, “plugin path”, and “options”. Here some explanations regarding each of them.
That’s all concerning the installation and configuration of the agent. Now, let’s see how we can configure the blësk server to accept the data sent by the agent.
1. Log in to the blësk server through an SSH connection. Edit the config.inc.php file located in the /etc/nrdp directory.
2. Enter the pre-shared key that you had chosen previously under the “authorized_tokens” section of the configuration file and save your change.
Now the agent is installed and configured on the remote Windows server we wish to monitor, and its pre-shared key has been added to the blësk server NRDP configuration. The last step is to create/add the host in the APM module and start monitoring it.
1. Log in to the blësk web interface. Select the APM module.
2. Click on “Configure" from the top menu bar.
3. On the left panel select “Supervision | Host”. Press the “Add” button to add a host.
4. The following page will appear. Three of the fields are required, after that you should select the check command to use and fill the argument field.
5. Next, check the boxes “Registered” and “Active”, and go to the next tab “Check settings”. In the “Check settings” tab, we use the following settings for passively checked nodes.
6. We will complete the addition of the host by going to the “Alarm settings” tab. Here you have the default settings for passively checked nodes.
Once completed, click on the Save
button to save your changes for the host definition.
Once the passive host has been created and activated in APM, we need to activate the passive services to monitor on the host. These services represent the command lines we added in the agent configuration file on the remote Windows server.
1. For passive checks, there is eight pre-defined service template that we can activate in blësk. Go to “Configure | Administration | Supervision | Services”, then search for “passive” to see the list of passive check services available.
2. To activate, register and associate the passive service template to a passive host, edit the desired passive services template, then be sure that the following are selected.
Once completed, click on the “Save” button to save your changes for the service definition. Repeat the same procedure for any additional passive service templates you want to activate.
Finally, we need to make sure that all the modifications we made are correct and have been applied on the server. To do this, go to “Tools”, “Control” and click the four buttons in order to write and apply all the information.
Be aware that you should always click them in this order:
1. Write monitoring data
2. Write additional data
3. Check configuration files
4. Restart APM
When you press the “Check configuration files” button, blësk will verify if everything is ok. Never click the “Restart APM” button if you see that there are errors reported by the “Check configuration files” step.
You can now visit APM to see your newly added passive host and associated passive services!