-1

So i'm trying to set up zabbix web scenario to monitor webpage up/down. Ive found a way googeling which should work for me, however there is an issue in the login page. I need to be able to press TAB 4 times and then end it with a space to reach the login information panel. But i can not figure out how to tell zabbix to insert TABs or Spaces on the page before it attempts to login.

by default SMART-ID is our main authentication, and the order can not be changed as it would interfere with our user welfare policies. So i need to make zabbix able to navigate to the "Parool" tab for login. Also using the tab key on the page visualy does nothing untill you press the space bar, only after space bar it actually shows you where you have navigated.

enter image description here

So far i have tried to simply add tab and space in the "post fields" section however this does not do anything and i have not managed to google the information i require.

enter image description here

Mairold Kunimägi
  • 125
  • 1
  • 1
  • 10

1 Answers1

1

That's not how Zabbix Scenarios works.

Zabbix uses libCurl to check web endpoints, not a browser: you can't render javascript nor post/click to forms (ie: like Python Splinter does).

You can post data to specific web endpoints, like http://somewhere/test.php?id=2345&userid={BLABLABLA} then grab the output and/or the resulting http return code.

Please refer to the documentation for a complete overview.

Simone Zabberoni
  • 2,024
  • 1
  • 10
  • 15
  • Thanks for answering, however linking me a zabbix documentation which ive read from top to bottom multiple times will not help sadly. It mentions nothing on how to navigate my login page. – Mairold Kunimägi Dec 12 '19 at 12:36
  • "It mentions nothing on how to navigate my login page": the documentation cleary states how to use scenarios. Opening a browser, inputting data, clicking on a specific item etc. is a task you can't do with a Zabbix scenario (as I said -> libCurl). You'll need something external, like Splinter or Selenium. – Simone Zabberoni Dec 12 '19 at 12:42
  • Okey sorry, yeah i dont want anything external for this. The method works perfectly without the extra authenications methods in my test servers. So ill see if i cant create a URL to take me to the login page directly. On my test servers where there is only the username and password login the web scenario does its job wonderfuly. – Mairold Kunimägi Dec 12 '19 at 12:48
  • just an observation: It depends on what you mean by "working wonderfully"... If you post "tab keys" and other stuff like "sign in" to a web endpoint, the server can just ignore it and return you a 200/OK with a login page: it just means that the webserver is on! If you post username & password to `http://somwhere/api/login.php` and capture 200 or 401 (or something meaningful inside the response page) then -> yes it works, and it's how scenarios are supposed to be used. – Simone Zabberoni Dec 12 '19 at 14:06
  • Thats why i said test server dont have this authentication like the live server, meaning there is no need for tab keys or spaces. It just signs in. – Mairold Kunimägi Dec 16 '19 at 07:07