Web Transaction wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Interrex
Posts: 68
Joined: Thu May 19, 2016 8:42 am

Web Transaction wizard

Post by Interrex »

Good morning.

I want to create a "Web Transaction wizard" that checks if the timestamps for last update is up to date
Output on web site: "lastUpdated":"2019-07-21T20:10:00+02:00"

case 1 - login to web page.
<case id="1" url="https://webpage.com/" />

case 2 - check lastUpdated
I want to get a warning if the timestamp is not updated for 10 min and an critical if not updated for 15min.

Anyone that can help me create the usecase for case id 2? :)
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Web Transaction wizard

Post by ssax »

Webinject won't let you compare dates like that, neither will check_http, you'll likely need to use something like this that does support comparing dates:

https://exchange.nagios.org/directory/P ... on/details
Interrex
Posts: 68
Joined: Thu May 19, 2016 8:42 am

Re: Web Transaction wizard

Post by Interrex »

Thank you ssax.
I understand, check_json.py seems to do the the check I need.

Right now I'm stuck on getting it to work in my environment, seems like I don't have everything in place for running this python script.
(The pip & pip3 isntall command also fails for me when installing check_phyton.py )


It fails on:

userX@serverY:/usr/local/nagios/libexec $ ./check_json.py -help
Traceback (most recent call last):
File "./check_json.py", line 3, in <module>
import nagiosplugin
ImportError: No module named nagiosplugin

Any idea what I need to do to import the nagiosplugin module ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Web Transaction wizard

Post by scottwilkerson »

Code: Select all

pip install nagiosplugin
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Interrex
Posts: 68
Joined: Thu May 19, 2016 8:42 am

Re: Web Transaction wizard

Post by Interrex »

Thank you.

I have some python issues.. got the pip command working, but since my system is offline I have issues with all the depndecies for the plugin, so I need to solve those problems before I can test the plugin.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Web Transaction wizard

Post by cdienger »

Let us know if we can assist with anything and we'll wait for an update.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Interrex
Posts: 68
Joined: Thu May 19, 2016 8:42 am

Re: Web Transaction wizard

Post by Interrex »

Finaly got the python installation and plugins working.

The plugin works, but the site I try to check uses basic-auth.

Dont look like the check_json supports basic-auth, any workaround for that ?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Web Transaction wizard

Post by cdienger »

The plugin code would need to be updated or you would need a different plugin. https://exchange.nagios.org/directory/P ... 29/details is another JSON plugin that does support basic auth.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked