Archive

Posts Tagged ‘bash’

Centreon reporting email

March 1st, 2017 No comments

I had created a Nagios Script for auto e-mailing reports. Old Post
Since now I have fully migrated to centreon (centreon-engine) I needed also here to have an auto email report.

Read more…

yum update security check script

January 12th, 2017 No comments

simple bash script to check for missing security

this is important to make sure your linux is updated
here is the script:

Read more…

Categories: bash, BashScripts, Linux, Security Tags: , , ,

money conversion rate monitoring script

September 29th, 2016 No comments

If you want to easly monitor a money conversion rate, here is the script I wrote long long time ago (default is EURO x REAL)
./ moneyconversioncheck –minwarn 3 –maxwarn 4.0 –mincrit 2.8 –maxcrit 4.5 -v
Verbose Mode ON
EURO is 3.6189 validating
MONEYX OK: Value of EURO is – 3.6189

Read more…

Categories: plugins, script Tags: , , ,

iptables block country script

April 25th, 2016 No comments

My own server is daily attacked by SSH scanner and bruteforce scripts.
My fail2ban solution

Read more…

script to check aws status

September 23rd, 2015 1 comment

This is a bash script made to work with nagios and to automaticly check Amazon AWS status
based on the RSS from http://status.aws.amazon.com/
I did find something similar in Ruby
I tried to keep it simple as possible…

Read more…

Categories: Amazon-AWS Tags: , , , ,

aws backup script

August 11th, 2015 1 comment

This is a robust script that backups all instances that have a TAG, Backup=TRUE
it generates a AMI images, and snapshots of each Volume, also a nice e-mail with a HTML table nice format.

Read more…

AWS Cloud Watch bash script

August 3rd, 2015 No comments

This script was written by me a while back (still has an old version of the CLI)
I found a minor bug, when using non integer values (decimal values) causes a problem,
bash does not handle it very well.
Anyone who feels like updating and fixing please do so.

Read more…

Categories: Amazon-AWS, HowTo Tags: , , ,

check process uptime

December 10th, 2014 1 comment

Simple script to get any linux process uptime.
It could have been done using the /proc/PID too.

Here is the code:

Read more…

Categories: Nagios, plugins Tags: , , , ,

check_backend.sh

March 25th, 2014 No comments

Another bash script to monitor if there were any failed connections to the backend’s.
It is a simple aproach using the command:
varnishstat -1 -f backend_fail
Then it puts the output on a tmp file and next time it runs it checks if it is still having erros on the backend.

Read more…

varnish check_hitratio

March 25th, 2014 No comments

We need to know if varnish is caching hit ratio is as it should.
So I wrote this simple bash plugin for nagios.

Read more…