How to avoice 0 in PowerShell output using nrpe

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

How to avoice 0 in PowerShell output using nrpe

Post by informatica »

Hi Team,

We are using one script to check the status of agent, however we are getting the output but we are getting the zero's in out put. Please find the attached script and suggest and how we can avoid the zero's in output. In the output we would like to avoid the zeros. Please find the actual output while executed in server it self.

the below is the output.
check_nrpe -H 10.65.32.6 -t 30 -c check_Qualyscloudagent
2021-05-12 17:31:04 |'QualysAgent'=0 'found'=0 'in'=0 'default'=0 'location
2021-05-12'=0 '17:31:04'=0 '|'=0 'And'=0 'Qualys'=0 'service'=0 'is'=0 'running
2021-05-12'=0 '17:31:04'=0 '|'=0 'With'=0 'Qualys'=0 'being'=0 'installed'=0 'in'=0 'targeted'=0 'version'=0 '(4.4.0.38)'=0
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: How to avoice 0 in PowerShell output using nrpe

Post by benjaminsmith »

Hi Informatica,

Looking over the script, I believe this because it's not parsing the output correctly, and just returning empty strings. I would add some extra print statements into the script to help debug this. This will help determine what data is getting passed correctly and at what point in the script it's failing.

Please note, we are not able to provide custom programming or plugin development as part of product support, but if you're interested in that, please reach out to our sales team, [email protected] for assistance.

Let us just know what you find out.

Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked