Skip to content

Instantly share code, notes, and snippets.

@skihero
Created October 1, 2014 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skihero/6ac6bc8116c00873255e to your computer and use it in GitHub Desktop.
Save skihero/6ac6bc8116c00873255e to your computer and use it in GitHub Desktop.
command conf construction helper nagios
# get a list of files
for f in `ls`
do
echo "command[${f}]=/usr/lib/nagios/plugins/${f} -H localhost -db apigee -u nagios --dbpass random_password # -w -c "
done
# The shit that prints the rows for wiki
for f in `ls`
do
echo "
<tr>
<td style=\"text-align: center;\"> ${f}</td>
<td> command[${f}]=/usr/lib/nagios/plugins/${f} -d apigee -H localhost -l nagios -p random_password</td>
<td> Query</td>
<td> check_postgres.pl</td>
</tr> "
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment