Page 1 of 1

Regex and ssh proxy

Posted: Tue Oct 13, 2020 9:06 am
by btayl
Using a ssh proxy can you use an regex repression on date retrieved from a script ?

Re: Regex and ssh proxy

Posted: Tue Oct 13, 2020 2:30 pm
by benjaminsmith
Hi @btayl,

Hope you are enjoying the trial of Nagios XI. Sure, that could certainly be accomplished with some scripting. Are you trying to run checks on the date returned? Please let us know a few more details and I can provide some suggestions.

Thanks!
Benjamin

Re: Regex and ssh proxy

Posted: Tue Oct 13, 2020 3:26 pm
by btayl
Hi Benjamin

Trial is going good just trying to wrap up different monitors we use to prove we can switch to your product.

so in our current monitoring solution their is a script called Wrapper on a AIX machine that we pass parameters to and then we are able to do a matching expression "/Neglected messages in: (.*)/" and then in threshold setting Error != '(none)' Good == '(none)'

the script is a vendor owned.

Re: Regex and ssh proxy

Posted: Wed Oct 14, 2020 1:37 pm
by benjaminsmith
Hi,
Trial is going good just trying to wrap up different monitors we use to prove we can switch to your product.
Great just let us know what else you need help with.

Regarding the wrapper script, that doesn't look like too much trouble, Nagios XI is very flexible. You'll set up a service using SSH, and then for each check Nagios XI will run the script locally either as a service check or event handler depending on your requirements.

If this is set up as a service check, the script would need to return a compliant exit code, so you may need to modify the script or create another wrapper.

Here a few useful links to help get you started.

Monitoring Hosts Using SSH
Nagios Plugin Guideline
Introduction to Event Handlers

Re: Regex and ssh proxy

Posted: Wed Oct 14, 2020 1:37 pm
by benjaminsmith
Hi,
Trial is going good just trying to wrap up different monitors we use to prove we can switch to your product.
Great just let us know what else you need help with.

Regarding the wrapper script, that doesn't look like too much trouble, Nagios XI is very flexible. You'll set up a service using SSH, and then for each check Nagios XI will run the script locally either as a service check or event handler depending on your requirements.

If this is set up as a service check, the script would need to return a compliant exit code, so you may need to modify the script or create another wrapper.

Here a few useful links to help get you started.

Monitoring Hosts Using SSH
Nagios Plugin Guideline
Introduction to Event Handlers