Page 1 of 1
Web Transaction wizard
Posted: Mon Jul 22, 2019 12:58 am
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?

Re: Web Transaction wizard
Posted: Mon Jul 22, 2019 1:45 pm
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
Re: Web Transaction wizard
Posted: Tue Jul 23, 2019 5:52 am
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 ?
Re: Web Transaction wizard
Posted: Tue Jul 23, 2019 7:49 am
by scottwilkerson
Re: Web Transaction wizard
Posted: Thu Aug 01, 2019 12:31 pm
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.
Re: Web Transaction wizard
Posted: Fri Aug 02, 2019 9:31 am
by cdienger
Let us know if we can assist with anything and we'll wait for an update.
Re: Web Transaction wizard
Posted: Wed Aug 07, 2019 1:14 pm
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 ?
Re: Web Transaction wizard
Posted: Wed Aug 07, 2019 1:30 pm
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.