A detailed explanation of zabbix server and client installation and its concepts are mentioned in the below links.
Zabbix Installation
Basic Concepts
Here I will explain how to monitor a website, Its downloading speed and successful logins.
For web monitoring we need to,
Create a Host from the configuration tab.
create an application for that host and name it as web_sitename or whatever.
Then go to "web" from configuration tab, From there you can create new scenario.
We need to specify,
1. application name
2. Scenario name
3. Update interval
4. Agent (any listed browser)
5. variable ( Can give username and password as variables )
For example {user}=admin
{password}=zabbix
As an example here we will monitor successful login of zabbix frontend. So create a scenario exactly as above.
Now we need steps to be done for checking website.
For that click on the "Steps" tab.
Step 1
name - first page
url - http://<server-ip>/zabbix/index.php
status - code 200 ---> (successful status)
required -
Step 2
name - log in
url - http://<server-ip>/zabbix/index.php?login=1
post - name={user}&password={password}&enter=Sign in
status - code 200 ---> (successful status)
required -
Step 3
name - check login
url - http://<server-ip>/zabbix/dashboard.php
status - code 200 ---> (successful status)
required - Profile ---> (search for this matching string)
Step 4
name - Log out
url - http://<server-ip>/zabbix/index.php?reconnect=1
status - code 200 ---> (successful status)
required -
Save the scenario.
Now from the monitoring tab, go to "Web" and click on the scenario. You can see status with graph.
If password changed then an error like "required pattern not found" will show at the 3rd step.
We can create a trigger to alert this.
Go to hosts -> trigger
create new trigger
Name the trigger and provide an expression as below.
expression - {<host-name>:web.test.fail[<scenario-name>].last(0)}#0
<host-name> should be the name given to the host.
<scenario-name> hould be the Scenario name.
Set severity to required level and save.
Now trigger will work. We can set action for this trigger to sent message to user and group.
For that,
create an action in configurations tab.
Set condition as trigger name and trigger value as PROBLEM.
Operation as sent message to user and group.
We can set email and smtp configurations in mediatypes under Administration tab.
Good article but what if the web site I am trying to monitor uses either javascript or ActiveX to work?
ReplyDeleteMain question for me here is how to log out? There is no parameters I could pass as part of URL to make the system log me out.
logout also doesnt work because of session id, and seems that it cant be grabbed...?
ReplyDelete