Archive for the ‘PerlScripts’ Category

mytop mysql

April 27th, 2012 No comments

I would like to share the ultimate MySQL performance debugger tool.
Written by my friend Nereu.

The output is like this

Read more…

Parse nagios services.cfg

August 20th, 2009 No comments

When importing services.cfg from nagios2 to nagios3 with Centreon there are few parameters that must exist,
one of them is service_description. In a project I had to import almost 4 thousand services and many did not have
a service_description so I wrote this perl script to parse the services.cfg and get the use info parse it and set as a service_description, it can also be used for other means, like changing just a specific service…
The script use a nice concept called Finite State Machine
version 6, generate new services.cfg creating service_description, download here
version 7, looks up for a specific service or host and changes itm download here


Parse nagios hosts.cfg

August 7th, 2009 No comments

I am in a project to import over 600 servers from old nagios 2.0 to nagios 3.0 / Centreon.
So the sysadmins here do not put the address field inside the hosts.cfg, so I either ping 500 servers copy
and paste the IP, or I write a script that does it to me.
Here is theĀ  perl script to get IP address from hostnames

Categories: HowTo, Nagios, PerlScripts Tags: , , , , ,

Howto backup ESX

July 16th, 2009 1 comment

HOW TO backup ESX 3.0.1 with

This nice perl script allows online backup of Virtual Machines to a remote FTP/SMB/NFS
It was written by Massimiliano Daneri, and many other authors contributed
it can be downloaded from here

How to install it:

Download and copy to a the ESX server using WinSCP, copy to /etc/vmbk
Login via SSH into the ESX server:
# cd /etc/vmbk
# bash
Runing the script from /etc/vmbk/ it will work, since the dependencies are in these folders.

Read more…

Perl Open Relay Script

February 18th, 2009 1 comment

Need to check for open relay servers, here is the script I wrote in perl to auto check from a list of IPs or Hostnames.

Read more…

Categories: HowTo, PerlScripts, Security Tags: , , ,

Perl Nagios Plugin

January 21st, 2009 1 comment

Thanks to Ton Voon now it has become even easier to develop nagios plugins using Perl.
A family of perl modules to streamline writing Nagios Just Released 6 Jan 2009.

Read more…

Squid howto

December 2nd, 2008 2 comments

This week I setup a cool Squid Proxy for our network at the office. What it does?
Follow also the HowTo Setup SquidGuard
1. Caches the websites people visit, so it usess less bandwith and improve performance
2. Allow managers to review web usage,
3. Allow restriction of certain webpages, content etc…

Read more…

Script to automatically get emails from pop3

November 20th, 2008 4 comments

Script to automaticly get emails from pop3 servers using getmail allows multiple downloads, auto search.

Read more…

GetMail from command line

November 12th, 2008 No comments

Getting email from the command line was always something I wanted, also to be able to filter what I get.
This great tool is something like fetchmail but better, thanks to Charles Cazabon who wrote this amazing tool in python. Here is more info
Later I could even have it scripted, if I need to search my emails, it should download the mailbox (without any attachments) and then search for a string within all emails. Well its not all done, but I believe I found the correct tools for it. Hope to come up with nice script in the future.

Read more…

CheckFileSize VBS for Nagios

October 22nd, 2008 24 comments

Nagio/NRPE_NT VBS Script to check the size of file(s) inside a Folder.

IMPORTANT, From nagios you Must pass double slashes

Read more…