ZABBIX Forums  

Go Back   ZABBIX Forums > Zabbix Discussions and Feedback > Zabbix Help

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2014, 00:09
will.emmerson will.emmerson is offline
Junior Member
 
Join Date: Aug 2014
Posts: 3
Default How to setup triggers and notifications for Web Monitoring

Hi,

I've setup web monitoring for a particular page for downloading a brochure on my website, it's setup so that it needs to return the status code '200'. This works fine and I can see this in the Monitoring > Web section of Zabbix. However, when it comes to setting up the Trigger so that I can setup an action to send an email - I'm at a loss.

I've so far tried the following:

Item Configuration

Name - Brochure
Type - Simple Check
Key - web.test.fail[Scenario]
Left the rest as defaults, then chose the application in question.

Trigger Configuration

Name - Brochure
Expression - {Brochure Download:web.test.fail[Scenario].last(0)}#0


Please could someone explain how I would go about setting up both an 'Item' and 'Trigger' so that if the status code is anything but '200' it triggers an alert?

Best Regards,

Will
Reply With Quote
  #2  
Old 07-08-2014, 15:05
ingus.vilnis ingus.vilnis is offline
Senior Member
Zabbix certified specialist
 
Join Date: Mar 2014
Location: Riga, Latvia
Posts: 598
Default

Hello and welcome!

As from documentation (https://www.zabbix.com/documentation...nitoring/items), you have to create your trigger for status codes based on the item key web.test.rspcode[Scenario,Step].

Best Regards,
Ingus
Reply With Quote
  #3  
Old 07-08-2014, 16:35
will.emmerson will.emmerson is offline
Junior Member
 
Join Date: Aug 2014
Posts: 3
Default

Hi ingus,

Thanks for your reply. So if I wanted to do it based on for any response code other than 200, would it be the following?

web.test.rspcode[Scenario].last(0)}#0

...so real life example where scenario name is BPM Brochure:

web.test.200[BPM Brochure].last(0)}#0

Am I also correct in saying that this should be set to Item Type (Numeric (float))?

Thanks in advance,

Will Emmerson
Reply With Quote
  #4  
Old 07-08-2014, 17:02
ingus.vilnis ingus.vilnis is offline
Senior Member
Zabbix certified specialist
 
Join Date: Mar 2014
Location: Riga, Latvia
Posts: 598
Default

Hi Will,

the expression in your real scenario would be:
Code:
{<host name>:web.test.rspcode[BPM Brochure].last(0)}#200
Replace the <host name> with actual name of the host.

For the Type of information you can use either Numeric (float) or (unsigned).

Best Regards,
Ingus
Reply With Quote
  #5  
Old 07-08-2014, 19:35
will.emmerson will.emmerson is offline
Junior Member
 
Join Date: Aug 2014
Posts: 3
Default

Hi ingus,

Thanks - I think it's almost there - however in the items section it says 'Status - Not Supported'.

So in the item table it reads as:

Name:BPM Brochure
Triggers:Triggers (1)
Key:web.test.rspcode[BPM Brochure]
Interval:30
History:90
Trends:365
Type: Zabbix agent - I also tried 'Simple Check' but this returned 'not supported'.
Applications: Brochure
Status: Not supported

Is the type incorrect for type of check, or perhaps is there something else I need to setup?

Best Regards,

Will

Last edited by will.emmerson; 07-08-2014 at 19:36. Reason: Manners!
Reply With Quote
  #6  
Old 08-08-2014, 00:57
jan.garaj jan.garaj is offline
Senior Member
Zabbix certified specialist
 
Join Date: Jan 2010
Location: United Kingdom, Slovakia, Bulgaria
Posts: 482
Default

You should to follow web monitoring manual:
https://www.zabbix.com/documentation...web_monitoring
Then the item web.test.rspcode (plus another web metrics: response code/time,...) will be available.

web.page.*:
https://www.zabbix.com/documentation...s/zabbix_agent
is different approach (simpler; executed on agent).
__________________
Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant
Reply With Quote
  #7  
Old 02-10-2014, 12:38
taxiarxos taxiarxos is offline
Junior Member
 
Join Date: Sep 2014
Posts: 4
Default

Hello,

I have the same issue.. Any solution about this?

Thanks
Reply With Quote
  #8  
Old 18-07-2015, 02:24
dogbert831 dogbert831 is offline
Junior Member
 
Join Date: Mar 2014
Posts: 13
Default

I know this is an old thread. I would like to do the same thing. I've read the documentation referenced and I don't see where it refers to web.test.rspcode. I've tried it as a item of type "simple check" and also as a trigger. Neither one works. Ideally I'd like to get and alert to show what the https status code is when the trigger fires. Anyone been able to do this?
Reply With Quote
  #9  
Old 18-09-2016, 12:30
hertell hertell is offline
Junior Member
 
Join Date: Aug 2010
Posts: 29
Default

Quote:
Originally Posted by dogbert831 View Post
I know this is an old thread. I would like to do the same thing. I've read the documentation referenced and I don't see where it refers to web.test.rspcode. I've tried it as a item of type "simple check" and also as a trigger. Neither one works. Ideally I'd like to get and alert to show what the https status code is when the trigger fires. Anyone been able to do this?
Replying to this ancient tread just in case someone is looking for an answer to this: The items created are visible only when you create a trigger or view the latest data.

Last edited by hertell; 18-09-2016 at 12:33.
Reply With Quote
Reply

Tags
item, monitoring, notification, trigger, web

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:08.