Archive for the ‘BashScripts’ Category

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…

monitor site IPS

February 23rd, 2017 No comments

I am sick and tired of my site going down, even know its once in a while it just bother me a lot.
So I spent 20m to write this script and block bad IPs even know I use modeavsive to block more then X concurrent connections from one IP my site keeps going down!

Read more…

Categories: bash, BashScripts Tags:

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: , , ,

Reverse SSH Tunnel

November 14th, 2016 No comments

The idea is to have my IP autostart connect to my Cloud server,
this way I can remote control my Raspberry PI without having to configure DynDNS and firewall rules.
The only requsisite is that PI has internet and run a simple script on startup to estabilish the SSH tunnel

Read more…

tomcat multiple instances script

May 20th, 2016 No comments

This scripts is easy to use and creates multiple tomcats on a single server.
I still find it amazing and sad that by default and by RedHat support, you can only
install a single Tomcat instance per server! This is crazy.
Imagine a 16 CPU 64GB server with a single instance.

Read more…

Categories: bash, BashScripts, HowTo, Tomcat 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…


March 25th, 2014 No comments

Simple script to check if the varnish daemon has been restarted latelly

Here is the code:

Read more…

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…

script to monitor cpu usage by process

March 12th, 2014 1 comment

A bash script to get the CPU usage by process
nohup ./check_proc bwengine 70 &

bwegnine is the process name we want to monitor
70 is to log only when the process is using over 70% of the CPU.

Read more…

Categories: BashScripts Tags: , , , ,