riskersen / Monitoring

Monitoring plugins wich are Nagios/icinga compatible
65 stars 112 forks source link

check_dwd.php: changed URL / enhancements #56

Closed sgruber94 closed 3 years ago

sgruber94 commented 3 years ago

Adding enhancements to check_dwd.php

Added possibility to specify: -u url -r region -h help -s show or hide Url ( 0 = hide)

./check_dwd.php -u https:/www.dwd.de/DE/wetter/warnungen_gemeinden/warntabellen/warntab_rps_node.html -r Mainz -s 0

MarcusCaepio commented 3 years ago

I think, there is a little mistake in your version: When you print the output without url, the "|" is missing to define perfdata:

if($show_url > 0){
    echo $nagios_return[$out_state] . ": " . $output . PHP_EOL . "URL: " . $url . "|" . $perf;
}else{
    echo $nagios_return[$out_state] . ": " . $output . PHP_EOL . $perf;
}

Should be:

if($show_url > 0){
        echo $nagios_return[$out_state] . ": " . $output . PHP_EOL . "URL: " . $url . "|" . $perf;
}else{
        echo $nagios_return[$out_state] . ": " . $output . PHP_EOL . "|" . $perf;
}

Cheers, Marcus

sgruber94 commented 3 years ago

Hi Marcus, thanks for your feedback. I adjusted the Code.

riskersen commented 3 years ago

Danke!