to monitor a webpage & send an email each time it does not display the expected string.
I want it implemented using ossec's custom rules.
because ossec is already installed & configured for email alerts.
normal string is like:
API keyword V1
In case the server is down or it cannot access database it returns something different, like this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<title>503 Service Unavailable</title>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
<address>Apache/[url removed, login to view] (Debian) Server at [url removed, login to view] Port 443</address>
I propose to set a cron task that do:
curl -o /tmp/frontalive [url removed, login to view]
the game is not to set the ossec custom rule to detect changes on /tmp/frontalive so that it triggers an email when it is not equal to "API keyword V1"
see Create Custom decoder and rules — OSSEC 2.8.1 documentation
[url removed, login to view]
9 freelancers estão ofertando em média $78 para este trabalho
Hi there. Having worked on many similar projects in the past I am confident in delivering this project. \nPlease let me know if you wish to take it further and we can further discuss your requirements.