Hello everyone, here is some code intended to help you monitor any node of your network using ICMP (ping), but, with a some help, you could load the hosts to test from a MySQL database and register the state of it on the same database. First Create a database and a table with some fields like an ID , a Description for the node (Just to have a human identification), the HostName or IP Address , and the State (This could have an UP or DOWN state) CREATE DATABASE MysqlDatabase; use MysqlDatabase; CREATE TABLE `MysqlTable` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `Description` VARCHAR( 60 ) NOT NULL , `MysqlHostColumn` VARCHAR( 80 ) NOT NULL , `MysqlStateColumn` VARCHAR( 30 ) NOT NULL ); And insert some IP addresses or hostnames with some description for them: INSERT INTO `MysqlTable` (`Description`, `MysqlHostColumn`, `MysqlStateColumn`) VALUES ('Gateway', '192.168.1.1', 'DOWN'); INSERT INTO `MysqlTable` (`Description`, `MysqlHostC...
Comentarios
Publicar un comentario