DEV Community

SysUpTime
SysUpTime

Posted on

Monitor Amazon Price Changes

This article demonstrates how to use the web site monitor to check a product's price on Amazon periodically and send email when price changes.

Amazon Page Info

Let's pick an Amazon Kindle as an example. The shopping URL is

https://www.amazon.com/All-new-Kindle-Oasis-now-with-adjustable-warm-light/dp/B07F81WWKP/ref=sr_1_9?dchild=1
Enter fullscreen mode Exit fullscreen mode
  • Use Chrome browser to open the URL. Right click on the price area and select "Inspect" menu.

Alt Text

The HTML source is shown below:
Alt Text

So we can look for a "td" node with "id" being "priceblock_ourprice_lbl", and its text node value is "Price:", and the real price is in the subsequent "span" node with "id" being "priceblock_ourprice".

Configure SMTP server

SMTP server needs to be configured first for sending email on alarm

  1. Select "Setting/SMTP Server" menu:
    SMTP

  2. Enter SMTP server parameters. We use gmail as an example:
    SMTP

Then press "Send Test Mail" to check if the SMTP server has been configured successfully.

Configure SysUpTime

  • Add a web site monitor:

    Alt Text

    In the URL field, enter

  https://www.amazon.com/All-new-Kindle-Oasis-now-with-adjustable-warm-light/dp/B07F81WWKP/ref=sr_1_9?dchild=1
Enter fullscreen mode Exit fullscreen mode
  • Press "Configure" button next to the "Threshold settings". Alt Text

Move "body response time" to the left and move "content match" to the right panel.

  • Configure it to use simple content match, and choose "Line contains" radio button, enter.
  engine_daemon_container_states_containers{state="running"}
Enter fullscreen mode Exit fullscreen mode

to the text field of "Line contains". In the token field, enter "2".
The value is the second token of the line.
Alt Text

  • In the threshold field, enter 340, so that an alarm will be raised when price drops below 340. Alt Text

Press "Ok" buttons to go back to the screen at step 1.

  • In the following screen Alt Text

Press "Configure" button next to the "Actions"

  • Enter your email address to receive email notification when price drops below threshold:

    Alt Text

  • Press "Ok" buttons to save the monitor.

  • (Optional) In the "Manage Monitor" dialog, select the newly created monitor and press "Chart" button to see the real time chart.
    Alt Text

Top comments (0)