Thursday, December 11, 2008

Dj Kratediggah - Clavicula Issues 1

Heyho,

i did a mixtape some days ago and here is the missing track listing. some artwork and a cuttet and mastered version will follow. hopefully you all enjoy it. feedback is really appreciated.

1. Minnie Riperton - Les Fleur
2. twit one - En Boudon (Fleur Earth Skurreal EP)
3. Buckshot Lefonque - Breaksfast at Denny's
4. Kaydee and Chief - Creativity (Alternative Mix)
5. Louis Logic - Punchline Remix
6. Mystik Journeymen - Liquid Cement
7. Frank n Dank - Okay
8. Dynamite Deluxe - Bis Dato
9. Masta Ace - Brooklyn Masala ft. Leschea prod. by Xplicit
10. KC da Rookee 0 Mega Skunk
11. Kate Nash - Merry Happy
12. Dj Mitsu and the Beats - Right Here ft. Dwele
13. Ta'Raach - Make it
14. Huss und Hodn - Hast Du einen Cut
15. Shawn Jackson - Feelin' Jack
16: Non phixion - We are the Future
17. Eligh, Scarub, Murs - Disappointments
18. Dwele - Holla
19. Mathematik - Rhyme training
20.Ugly Duckling - Einsteins Takin' Off
21. Shawn Jackson - Gold Medal Kids
22. Reef the lost Cauze - Live As It Gets
23. Sunspot Jonz - Metamorphosis
24. Ugly Duckling - Abigail Silk
25. Lykke Li - Let it Fall
26. Living Legends (taken from UHB V Legacy 2099 Sampler) - lost groove

Bohboh,
kratediggah

Wednesday, September 3, 2008

check_iostat and check_multi - perfdata discarded bad UOM ','

i had this dumb issue today.

The plugin check_iostat returned wrong perfdata. check_multi discards perfdata that is not returned like its defined in the nagios developer guidelines so i wasnt able to get perfdata from my check_iostat checks within a check_multi Service.

So i just 'patched' (is it possible to "patch" shell scripts? - dont think so ;-) ) the plugins.
I Just replaced the last lines where the performance data is returned with my own ones which do replace all 'comma' with 'dots'. It is looking like this:

UPDATE: I recognized that the whole perfdata output wrong, not even the issue with the commata there was even an issue with the order of the returned values, here is how it is working for me:

# Perfdata support
#${ECHO} "$msg|ioread=${ioread}c;${CRITICALREAD};${WARNINGREAD};0;iowrite=${iowrite}c;${CRITICALWRITE};${WARNINGWRITE};0; \n"
MYPERF="$msg|ioread=${ioread}kByte/s;${WARNINGREAD};${CRITICALREAD};0;0;iowrite=${iowrite}kByte/s;${CRITICALWRITE};${WARNINGWRITE};0;"
MYPERF=`echo "$MYPERF" | sed 's/\(,\)\([0-9]*\)/\.\2/g'`
echo $MYPERF
exit ${exitstatus}


Hope this helps somebody.

bohboh,
kratediggah

Monday, September 1, 2008

Nagios Check Fails: Can't locate utils.pm in @INC (@INC

i had this issue today several times. It is caused because a particular plugin isn't able to locate the utils.pm file. In my case this was caused by a wrong defined lib include path in following plugins:

check_generic, check_snmp_int, check_multi, check_file_age

It's pretty easy to fix it, just change:

use lib "/usr/local/nagios/libexec" ;

to

use lib "/usr/lib/nagios/plugins" ;

and everything will be fine.

bohboh,
kratediggah

Friday, August 29, 2008

Citrix Presentation Server Farm Montiroring in Nagios with check_multi and SNMP

here is how i do monitor Citrix Presentation Servers. It is mostly about checking normal System Parameters like CPU, Disks and the Check out if all Services are running and the corresponding Ports are responding.

I do it with a check_multi query.

check_multi Command File:

#
# win_citrix.cmd
#
# config file for checking Citrix Presentation Servers
#
# Sebastian Koch, 2008
#
#--- citrix states ---
#state [ WARNING ] = COUNT(WARNING) > 2
#state [ CRITICAL ] = COUNT(CRITICAL) > 2

#--- citrix ports
command[ citrix_cmc_port ] = check_tcp -H $HOSTADDRESS$ -p 2513 -w 2.0 -c 3.0
command[ citrix_ica_port ] = check_tcp -H $HOSTADDRESS$ -p 1494 -w 2.0 -c 3.0
command[ citrix_ima_port ] = check_tcp -H $HOSTADDRESS$ -p 2512 -w 2.0 -c 3.0
command[ citrix_outlook_de ] = check_ica_metaframe_pub_apps.pl -C citrix.mydomain.tld -W "Outlook 2003"

#--- citrix services
command[ service_activesync] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix ActiveSync Service"
command[ service_clientnetwork] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix Client Network"
command[ service_diagnostic] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix Diagnostic Facility COM Server"
command[ service_encryption] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix Encryption Service"
command[ service_management] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix Independent Management Architecture"
command[ service_mfcom] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix MFCOM Service"
command[ service_print] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix Print Manager Service"
command[ service_servicesmgr] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix Services Manager"
command[ service_sma] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix SMA Service"
command[ service_xml] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix XML Service"
command[ service_xte] = check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG2$ -n "Citrix XTE Server"


Check Command Definiton:
$ARG3$ can be used for additional parameters (e.g. -s suppress_perfdata-,

define command {
command_name check_multi
command_line $USER1$/check_multi -t 40 -T 180 -f $ARG1$ -l /usr/local/nagios/libexec/ -r 11 $ARG3$
}

Service Definition:

check_command check_multi!/usr/local/nagios/etc/multicommands/win_citrix.cmd!community

Hopefullt this works out for you. Please send me comments if you got additions/corrections.

bohboh,
kratediggah


Cisco Call Manager Monitoring in Nagios with check_multi and SNMP

Hi,

I recently needed to integrate Cisco Call Manager Devices into Nagios and i did not find anything on the web, no plugins, neither OIDs. So i needed to figure them out by myself and after some work i had this check_multi command definition which integrates some ccm parameters like version, hostname and registered phones, ata's gateway ip's and some ither stuff.

The best is to do it the "check_multi" way, but it would be possible to cut every checkout and make a single one outof it.

Requirements:
ftp://ftp-sj.cisco.com/pub/mibs/v2/CISCO-CCM-MIB.my - Cisco Call Manager MIB - should be placed into /usr/share/snmp/mibs
check_multi

The cisco_ccm.cmd - i place all my multi commadn definitions in nagios/etc/multicommands/

Command File:

#
# cisco_callmanager.cmd
#
# Sebastian Koch, 2008
#
# $ARG2$ needs to be the snmp community string
#
#--- voice gateway ips
#
# 1.3.6.1.4.1.9.9.156.1.11.1.1.6.2
# 1.3.6.1.4.1.9.9.156.1.11.1.1.6.3
# 1.3.6.1.4.1.9.9.156.1.11.1.1.6.4
#
#--- cisco system parameters
command[ hostname ] = check_snmp -m SNMPv2-MIB -H $HOSTADDRESS$ -C $ARG2$ -o 'SNMPv2-MIB::sysName.0' -l SysName -l 'System Name'

#--- call manager ios versions
command[ ccm_version ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmVersion.1' -l "CCM Version"
command[ ccm_system_version ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmSystemVersion.0' -l "CCM System Version"

#--- call manager stats
command[ active_phones ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmInActivePhones.0' -l "Active Phones" -u 'Phones'
command[ registered_phones ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmRegisteredPhones.0' -l "Registered Phones" -u 'Phones'
command[ unregistered_phones ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmUnregisteredPhones.0' -l "Unregistered Phones" -u 'Phones'
command[ rejected_phones ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmRejectedPhones.0' -l "Rejected Phones" -u 'Phones'
command[ active_atas ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmActiveGateways.0' -l "Active ATA's" -u "ATA's"
command[ unregistered_atas ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmUnregisteredGateways.0' -l "Unregistered ATAs" -u 'ATAs'
command[ rejected_atas ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 'CISCO-CCM-MIB::ccmRejectedGateways.0' -l "Unregistered ATAs" -u 'ATAs'

#--- gateway ip's
#--- check if the gateway ip's are the expected ones (-r directive), the sed command is to correct the ouput

command[ gateway_ip1 ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 1.3.6.1.4.1.9.9.156.1.11.1.1.6.2 -l "Gateway Ip 1" -r "10.150.14.3" | sed s/\Wrong\ Type\ \(should\ be\ OCTET\ STRING\)\:// | sed s/\*//
command[ gateway_ip2 ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 1.3.6.1.4.1.9.9.156.1.11.1.1.6.4 -l "Gateway Ip 2" -r "10.200.14.3" | sed s/\Wrong\ Type\ \(should\ be\ OCTET\ STRING\)\:// | sed s/\*//
command[ gateway_ip3 ] = check_snmp -m CISCO-CCM-MIB -P 2c -H $HOSTADDRESS$ -C $ARG2$ -o 1.3.6.1.4.1.9.9.156.1.11.1.1.6.3 -l "Gateway Ip 3" -r "10.100.14.3" | sed s/\Wrong\ Type\ \(should\ be\ OCTET\ STRING\)\:// | sed s/\*//
#command[ interfaces] = check_interface_table.pl -H $HOSTADDRESS$ -C $ARG2$ -HTMLUrl 'https://monitoring-server/nagios/interfacetable'

Service Definition:

define service {
check_command check_multi!/usr/local/nagios/etc/multicommands/cisco_callmanager.cmd!public!-s suppress_perfdata=hostname,ccm_system,ccm_system_version,gateway_ip_1,gateway_ip_2,gateway_ip_3
}


Check Command Definition:


define command {
command_name check_multi
command_line $USER1$/check_multi -t 40 -T 180 -f $ARG1$ -l /usr/local/nagios/libexec/ -r 11 $ARG3$
}


Hopefully this helps out some people as i did not found anything on the web to monitor CCM Stats with nagios.

bohboh,
kratediggah

Thursday, July 31, 2008

Howto Link ilo2 Webinterface into Nagios

i needed to link my ilo2 webinterfaces into the Nagios Host Pages. As i got a bunch of servers i searched something to make this as simple as possible for me.

To ease the pain in of adding new servers, just add all your ilo2 controller to your dns domain. I added a CNAME Entry for every server like -ilo..tld

Now just create a hostextinfo file:

/usr/local/nagios/etc/hostextinfo_custom.cfg
# HP Server with ilo2 Controllers
define hostextinfo {
host_name server1,server2,server3,server4,serverX
notes <a href=https://$HOSTNAME$-ilo.mydomain.tld target=_blank style='text-decoration: underline'>$HOSTNAME$ -- ilo2 Webinterface</a>
icon_image hp.png
}

Now place something like: cfg_file hostextinfo_custom.cfg to your nagios.cfg to make sure it will be included on startup of the nagios daemon.

Now you will see a ilo2 Link in every Host View.

bohboh,
kratediggah

Tuesday, July 29, 2008

Change Server Name on ilo2 via SSH

it's pretty easy. Just connect to your ilo2 Controller via SSH.

Then just hit it like this:

hpiLO-> set /system1 oemhp_server_name=myFreshServer

and you will see something like this:

status=0
status_tag=COMMAND COMPLETED

Too make sure it worked out try this:

hpiLO-> show /system1 oemhp_server_name
status=0
status_tag=COMMAND COMPLETED


/system1
Properties
oemhp_server_name=myFreshServer
Verbs
cd version exit show set


hpiLO-> exit
status=0
status_tag=COMMAND COMPLETED

and you're finished.

BohBoh,
kratediggah

Monday, July 21, 2008

Firefox: Nagios Checker

I am using this since several weeks and it is a great plugin. Just try it out, it is great for getting nagios informations without being directly on the webinterface. It is developed by Peter Simek.

You can check it out here projects webpage or you can download the plugin here

bohboh,
kratediggah

Howto tell pound to log into its own logfile - pound.log

Ever wondered around why pound is logging into /var/log/syslog by default? I did. After some hours of searching around in the web for some solutions how to teach pound to log in its own logfile without finding anyhting, i needed to do some.

After some research i found the proper solution. My explanation will depend on a ubuntu 8.04 LTS Server.

Normally, sysklogd will overtake all messages from pound and will put them into syslog as anything with the facility 'daemon' goes in there by default. So first you need to change the LogFacility of pound as it is 'daemon' by default.

Just edit your /etc/pound.conf as follows:

#facility local0 is needed as sysklogd will
#seperate pound messages by this facility
LogFacility local0
LogLevel 3

And the change your /etc/syslog.conf

# log all (auth and such) to /var/log/syslog
# except messages with the facility local0 (pound)
#
*.*;auth,authpriv.none,local0.none -/var/log/syslog

# get the messages with the facility local0 and
# log them into the pound logfile
local0.* -/var/log/pound.log

The next step is to make sure that there is always a pound.log present. Therefore you need to modify the start script by adding a short conditional block into the top section of /etc/init.d/pound.

# Check if the pound.log exists, if not create one
if [ ! -e "/var/log/pound.log" ]
then
log_warning_msg "There is no pound.log, i'll create one"

touch /var/log/pound.log
chmod 0644 /var/log/pound.log
chown syslog:adm /var/log/pound.log
/etc/init.d/sysklogd reload > /dev/null
else
log_success_msg "pound.log was found"
/etc/init.d/sysklogd reload > /dev/null
fi

After you reloaded the sysklogd by /etc/init.d/sysklogd reload and restarted the pound, you should see the first log entries.

In my case the logfile increased to a size of more than 900 Mbyte after 24 hours, so don't forget to rotate the log. This could be done like this (/etc/logrotate.d/pound)

/var/log/pound.log {
daily
missingok
rotate 14
dateext
compress
notifempty
create 0644 syslog adm
postrotate
/etc/init.d/sysklogd reload > /dev/null
endscript
}

bohboh,
kratediggah

Teach firefox how to get back and what to select

I think it is pretty annoying, that clicking in the urlbar in firefox doesn't select anything by default. The next annoyance is that backspace won't bring you back the the previous page.

Every time i need to reinstall some of my systems i am searching around to get these fixed. Because of that I'll describe now how (makes it for me easier to find the answer next time ;-))

Type in the URL Bar in your Firefox: about:config (If you are using Firefox 3 you can click on the "I'll be careful, i promise!" to go on) and search for:

browser.urlbar.clickSelectsAll and set it to true - this will enable the Select on Click function

The next to change will be:
browser.backspace_action change it to 0

bohboh,
kratediggah

Tuesday, July 8, 2008

Amazing Sleeve Vinyl Heads

Today i heard about it at my favourite Radio Station about these so called "Vinyl Sleeve Heads". I like Jazz Liberatorz



Have a look at these (i mostly love the one with John Coltrane's Blue Train 2xLP) i found on another blog: http://yadogg.com/pictures/vinyl-sleeve-heads/


bohboh,
kratediggah

Bash: unrar several RAR Archives automatically

I recently had the case to unrar more than 100 .rar archives which all were password secured.

This one heleped me:
~$: find -type f -name '*.rar' -exec unrar -pPASSWORD x {} \;

Hope it will help you too.

bohboh,
kratediggah

Thursday, July 3, 2008

Nagios Plugin for Checking Cisco MPLS / HSRP States and IPs

This is my first self written plugin.

It will Check Cisco Routers (Active/Passive/HSRP) for Correct Active and Passive IP's and the Actual State of Components.

Download:

You can download it here.


This Script is capable to check MPLS Routers for their correct Ip's (Active / Passive) by querying them with SNMP and to compare this result with provided Ip's.
It is also possible to check for the Standby State of a Router.

Just see ./check_cisco_hsrp.sh -h for more Information.

Some Examples:

Check if the Active Router got a specific IP-Address

./check_cisco_hsrp.sh -H 10.35.10.250 -C public -m active 10.35.10.248
OK - Active Router Ip 10.35.10.248 is the correct ip (10.35.10.248)


Check if the Standby Router got the correct IP-Address

./check_cisco_hsrp.sh -H 10.35.10.250 -C public -m standby 10.35.10.249
OK - Standby Router Ip 10.35.10.249 is the correct ip (10.35.10.249)


Check if the Second (Standby) Router is in Standby State

./check_cisco_hsrp.sh -H 10.35.10.249 -C public -m state 5
OK - 10.35.10.249 is in HSRP State: standby

./check_cisco_hsrp.sh -H 10.35.10.248 -C public -m state 5
CRITICAL - 10.35.10.248 is in HSRP State: Active but should be Standby

HSRP States:
Standby = 5
Active = 6

Please let me know what you think about it. Please report bugs if you find some (i think so).

bohboh,
kratediggah