Archive

Posts Tagged ‘curl’

check_http.sh

March 14th, 2014 5 comments

Simple bash script using curl to check a website.
It works on HTTP and HTTPS.
Requirement: curl
Usage ./check_http.sh
Example:
./check_http.sh ‘http://oglobo.globo.com’ oglobo 1
OK – Site oglobo.globo.com key oglobo time 0.019 |’time’=0.019s;1

Read more…

Categories: Nagios, plugins Tags: , , , ,

check_ftp.php

September 20th, 2012 No comments

Nagios plugin to verify a FTP site, by uploading a file and testing the time it takes.
check_ftp.php

#!/usr/bin/php
< ?php // Script to connect to a FTP site and Upload a file, return the time it took and compare to WARN and CRIT values // Formated for Nagios usage // Use a test user for the FTP as it could be simple to get this password // I use a 5mb file, created by using: dd bs=1024 count=5120 skip=5120 if=/dev/sda of=file.tst // by Felipe Ferreira http://felipeferreira.net Read more…