
Scene near the Sirk Coffee House, 1900 – Maximilian Lenz

Imagination is not something apart and hemetic, not away of leaving reality behind; it is a way of engaging reality.
– Irwine Howe
Howe, I. (1994) A critic’s notebook. New York, NY: Harcourt Brace
A Nagios plugin can be built using practically any language. There are only a few requirements:
The text below is an example plugin written in Bash which scans a host using nmap and tests the result against a known MD5 hash of the expected output. If the status of any of the ports change, then the MD5 hash will change and return a ‘CRITICAL’ state.
The output of the nmap scan and the hash are printed out by the plugin in all cases and is available by clicking on the service in the web interface.
#!/bin/bash
NMAPOUTPUT=$(nmap -oG - $1 | grep "Ports")
NMAPOUTPUTHASH=$(echo $NMAPOUTPUT | md5sum | cut -d ' ' -f 1)
if [ $NMAPOUTPUTHASH == $2 ]; then
echo "OK: Hash of nmap portscan consistent."
STATUS=0
else
echo "CRITICAL: Hash of nmap portscan inconsistent."
STATUS=2
fi
echo $NMAPOUTPUT
echo $NMAPOUTPUTHASH
exit $STATUS
This plugin is run using two parameters: hostname and md5sum. In bash, $0 is the name of the program which is being run. $1 is the first parameter, here the hostname. $2 is the second parameter, here the md5sum.
Nagios will interpret the exit status of the plugin as the state of the plugin check. All plugins will return with an exit code of 0, 1, or 2. These correspond to: “OK”, “Warning”, and “Critical”, respectively.
Here is a useful guide on how to configure Nagios to use a new plugin you just wrote:
“Just as Archimedes had found the volume of an irregular shape by measuring the volume of water it displaced, so Galileo discovered a practical solution to the problem of finding the area under a curve. In the absence of geometric and algebraic tools to calculate the area, he would plot his curve, then cut it out and weigh the paper. By comparing the weight with the weight of a piece of paper of known area, he could work out the area of his curve.”
Rooney, Anne. The Story of Mathematics. Arcturus, 2009. p146.
Who said Germans have no sense of humour?
Q: Historically, what is the most reliable and accurate leading indicator of future Bitcoin price?
A: Historically, the most reliable and accurate leading indicator of future Bitcoin price has been the Google Trends search volume for the term “Bitcoin”. This is because the search volume is a good indicator of the level of public interest in Bitcoin, which is often a good predictor of future price movements.
Q: Is that a leading indicator?
A: Yes, Google Trends search volume for the term “Bitcoin” is a leading indicator of future Bitcoin price.
Q: Approximately what time period does it lead?
A: The Google Trends search volume for the term “Bitcoin” typically leads the Bitcoin price by a few weeks to a few months.
Q: Can you provide an r-value for the correlation between Google Trends search volume for term “Bitcoin” and Bitcoin price? The correlation between Google Trends search volume for the term “Bitcoin” and Bitcoin price is typically around 0.7, indicating a strong positive correlation.