Skip to header Skip to main navigation Skip to main content Skip to footer

Search form

Site branding

Home
What's up, home?

Main navigation

  • Home
  • Story mode
  • About
  • Features
  • Hardware list
  • Videos
  • GitHub (opens in new tab)
  • Daily AI generated stories (opens in new tab)

Part 56: Track product prices with Zabbix

Breadcrumbs

Breadcrumb

  • Home
  • Part 56: Track product prices with Zabbix

Main page content

By whatsuphome | 8:16 PM EET, Sat January 20, 2024

TL;DR

I set up Zabbix to monitor a product whose price fluctuates wildly between 23.90 and 59.90 EUR by using an HTTP Agent item with regex preprocessing to extract the price from the web page. A trigger fires whenever the price changes so I can catch it when
Image created by DALL-E

In December, my wife told my how she's annoyed about one Finnish company which tends to change its product prices out of nowhere all the time. To visualize this, of course I added a random product from that company's website to my dear What's up, home? monitoring.

The products in question are not complex to manufacture, and are not dependent on terribly fluctuating things like chip availability, oil prices or similar factors. Anyway, the price randomness is very real - the price varies between 23.90 EUR and 59.90 EUR.

How did I add this to monitoring?

As my first step, I did browse to a random product on the website and did inspect its source code with the browsers' usual developer mode inspector tools -- view source, inspect, all that. From there, I gathered the bits and pieces I need to be able to grab via Zabbix.

Of course, the easiest way to add this random product to my monitoring was just to use Zabbix HTTP Agent item type, make that fetch the particular URL and extract the info I need by using the pre-processing. As the website is very ... errm... modern in its source code, just extracting pieces of JSONPath or similar was not possible. Luckily, this regular expression used in item pre-processing did manage to catch the price from the web page.

Item pre-processing

Other than that, this was just a regular HTTP agent item.

HTTP agent item type

Now that I got this far, I added a new trigger to inform me every time the price does change.

Trigger which alerts if the value changes

And, that's really all to it. If you want to track a random product price for any item you'd like to get for a low price, here's a simple way to do it. Inspect the page source code, add HTTP agent item type, point it to URL, use item preprocessing, add a trigger, you are done. Zabbix can be really powerful whilst actually very simple.

 

 

whatsuphome
zabbix
pricemonitoring
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
I set up Zabbix to monitor a product whose price fluctuates wildly between 23.90 and 59.90 EUR by using an HTTP Agent item with regex preprocessing to extract the price from the web page. A trigger fires whenever the price changes so I can catch it when

Search

Who am I?

  • Janne Pikkarainen from Finland 🇫🇮
  • Began with computers in 1986 with C64
  • Doing IT for living since 1999
  • Principal Site Reliability Engineer at Forcepoint
  • A Zabbix Summit speaker every year since 2022
  • Walking, talking Zabbix commercial

Support my project

Buy me a coffee 

Footer menu

  • Contact

What's up, home? | Janne Pikkarainen | contact(at)whatsuphome.fi | 2022 - 2026

Developed and Designed by Janne Pikkarainen