I am currently creating a Dashboard app which is created with Ruby on Rails.
I have added a Server model and controller and the same for Ping.
What I want is to run the ping command on the given server IP address.
How would I go about this and log the results (status and M/S) into the database?
I would also like to know how to run the command every minute.
Probably the easiest way would be to open a TCP socket:
These uses TCP ping rather than ICMP so a firewall would need to be configured as appropriate.
Running this every minute can be achieve using something like:
and running that process all the time. You can look at something like Daemons (http://daemons.rubyforge.org/) if you want an easy way to background it.