I need to monitor two hosts using netwatch :
Code: Select all
[admin@R103] /tool netwatch> /tool netwatch print
Flags: X - disabled
# HOST TIMEOUT INTERVAL STATUS SINCE
0 10.1.11.1 998ms 10s up dec/22/2015 08:59:30
1 10.1.12.1 998ms 10s up dec/22/2015 08:59:30
I would like to send a command like this :
Code: Select all
/tool netwatch print where host=10.1.11.1
Code: Select all
<?php
require('../routeros_api.class.php');
$API = new RouterosAPI();
$API->debug = true;
if ($API->connect('1.1.1.1', 'admin', 'password')) {
$API->write('/tool/netwatch/print"');
$API->write('=?host=10.1.11.1');
$READ = $API->read(false);
$ARRAY = $API->parseResponse($READ);
print_r($ARRAY);
$API->disconnect();
}
?>
![Sad :(](./images/smilies/icon_sad.gif)
Does anybody can help me ?
Thanks.