Page 1 of 1

How to avoice 0 in PowerShell output using nrpe

Posted: Tue May 25, 2021 3:46 am
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

Re: How to avoice 0 in PowerShell output using nrpe

Posted: Wed May 26, 2021 9:54 am
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