display registry key values
display registry key values
Hello guys, i am not the greatest in Nagios and wanted to get your opinion. I want to get your opinion the best way to display a registry key value. I am not trying to setup warning or criticle message at the moment, i simply want to be able to view the output of the value. I have the NSclient installed on most of my devices.
The main goal for me is to get information about mcafee on my devices. for example i run this command below.
cmd: REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion
output: product version 10.7.0
^^ this is what i am wanting to be able to display for my devices via nagios for information purposes not alerts.
The main goal for me is to get information about mcafee on my devices. for example i run this command below.
cmd: REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion
output: product version 10.7.0
^^ this is what i am wanting to be able to display for my devices via nagios for information purposes not alerts.
Re: display registry key values
If you can construct a .bat file that will print out what you want reported to Nagios XI, you can plug it into NCPA as a plugin. Something like the Windows "reg query" command
Here's a guide: https://support.nagios.com/kb/article/n ... a-722.html
Here's a guide: https://support.nagios.com/kb/article/n ... a-722.html
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: display registry key values
Thank you for the reply. Most of my machines are using the NSclient. Is it possible to do the same thing using check_nrpe?
Re: display registry key values
i got the scripts to work via nrpe , my next question is how to make the service display the result for status information?
it appears once i click into the service, but i wont appear in the status information.
the bat file read as this
ECHO OFF
REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion
EXIT 0
see screen shot 1 in attachments: it shows information i am wanting when i click into the service see screen shot 2: no status information appears. i want the highlighted information from screen shot 1 to appear in the status information. any suggestions?
it appears once i click into the service, but i wont appear in the status information.
the bat file read as this
ECHO OFF
REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion
EXIT 0
see screen shot 1 in attachments: it shows information i am wanting when i click into the service see screen shot 2: no status information appears. i want the highlighted information from screen shot 1 to appear in the status information. any suggestions?
You do not have the required permissions to view the files attached to this post.
Re: display registry key values
Change it to @echo off to suppress that line.
Remember that whatever gets output to the console from the bat file is what's put as the check result from Nagios calling NRPE. Example:
Remember that whatever gets output to the console from the bat file is what's put as the check result from Nagios calling NRPE. Example:
Code: Select all
OK - load average: 0.23, 0.39, 0.36Code: Select all
CRITICAL - 192.168.254.13: rta nan, lost 100%If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: display registry key values
I added @ to the echo off. but it still isn't showing the output under status information.
here is screen shot of the bat file. Is this what you was talking about?
here is screen shot of the bat file. Is this what you was talking about?
You do not have the required permissions to view the files attached to this post.
Re: display registry key values
dchurch wrote:Change it to @echo off to suppress that line.
Remember that whatever gets output to the console from the bat file is what's put as the check result from Nagios calling NRPE. Example:Code: Select all
OK - load average: 0.23, 0.39, 0.36Code: Select all
CRITICAL - 192.168.254.13: rta nan, lost 100%
is there something i need to add to the argument to display the information under status information? The goal is for me to see it in green always, i am using this for information purposes not for alerts. so i just want to see the output under status information as OK or green.
Re: display registry key values
Try this:
Code: Select all
@echo off
REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion | findstr ProductVersion
exit 0Re: display registry key values
ssax wrote:Try this:
Code: Select all
@echo off REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion | findstr ProductVersion exit 0
Thank you very much! thats exactly what i was needing!
Re: display registry key values
ssax wrote:Try this:
Code: Select all
@echo off REG QUERY HKEY_LOCAL_MACHINE\Software\McAfee\Endpoint\Common\ /v ProductVersion | findstr ProductVersion exit 0
is there a way to filter out only the numbers in the results ? for example see screen shot , it shows the whole output but i am wanting to view only the number(highlighted area)
You do not have the required permissions to view the files attached to this post.