Nagios 监控Squid 的脚本

#!/usr/local/bin/php -q

<?php

function check_squid($url,$proxy){

        $http = curl_init();

        curl_setopt($http,CURLOPT_PROXY,$proxy);

        curl_setopt($http,CURLOPT_URL,$url);

        $result = curl_exec($http);

        curl_close($http);

        return $result;

}

?>

相关推荐