Doubt about pinging server and sending email [closed]

-1

I have a need to create a routine that every minute tests if the company's server is online and if it is not possible send an email notifying the name of the unavailable server and the time.

Another issue, as in case the internet falls, the connection will be unavailable, so would I have to have this program running in another location?

I've worked a long time with Java, at a very good time. However if you have something free that you can use, I'm willing to implement it.

Thank you. God Bless All

    
asked by anonymous 26.06.2015 / 18:06

1 answer

0

One solution is to develop a script that makes requests at a given time, according to the return type send the email. For ease, it can be configured as a job in Jenkins.

It is essential that you are on a separate server from where you will test, obviously if you are in the same location as the test server, if it drops you will never receive the email. The problem of running locally is dependence on the internet. I mean, can you ensure that there is internet locally 24 hours a day, all 7 days a week? So, the ideal is the script being on a separate server.
Another solution is to use the free services available on the internet, such as: New Relic Uptime Robot

Although they have some paid features, they perfectly meet the requirement of something basic.

    
26.06.2015 / 20:09