Monday, October 14, 2013

Install Baikal server on a SmartOS zone

Baïkal is a Lightweight CalDAV+CardDAV server. The home page is http://baikal-server.com/

Baïkal needs some PHP modules. I use Apache as web server.

pkgin in apache-2.4.6 ap24-php53-5.3.27
pkgin in php53-pdo-5.3.27
pkgin in php53-xmlrpc-5.3.27
pkgin in php53-pdo_sqlite-5.3.27 php53-pdo_mysql-5.3.27
pkgin in php53-dom-5.3.27

Now you must configure php.ini, adding the modules.


vi /opt/local/etc/php.ini

extension=xmlrpc.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=mbstring.so
extension=dom.so


The rest is pretty simple, following the install guide.

Friday, August 9, 2013

MegaCLI on SmartOS

I'm working on a Dell R710 with PERC H700 controller.

# prtconf -v|grep -i raid
                        value='RAID controller'
                        value='MegaRAID SAS 2108 [Liberator]'


# prtconf -v|grep -i perc
                        value='PERC H700 Integrated'
...


Firts of all go to LSI website http://www.lsi.com/support/Pages/Download-Results.aspx and search by keyword "MegaCLI. Then download Latest MegaCLI (there is Solaris OS).

Unzip it and copy MegaCLI/MegaCli_Solaris/x86/MegaCli to your SmartOS global zone (under /opt/custom/bin for example).

Now edit it with vi (yes, with vi), search for mr_sas and change this word (the driver name) to dr_sas.

Without doing this the utility doesn't detect any controller.
i.e.

# ./MegaCli -adpCount                              

Controller Count: 0.

Exit Code: 0x00


Thanks to jacques, Nils and elijah on the smartos-discuss mailing list.

Wednesday, August 7, 2013

using send_nsca from SmartOS global zone

If you don't want to install pkgin in the global zone, but you want to use Nagios send_nsca command, this is how I did it.

Inside a zone install the nagios-nsca package.

pkgin in nagios-nsca-2.9.1nb2


From the global zone, cd to the zone zfs and copy these files in a place of your own.

cd /zones/<uuid>

cp opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1 /opt/custom/nsca/

cp opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1
/opt/custom/nsca/

cp opt/local/lib/libmcrypt.so.4
/opt/custom/nsca/


Create a configuration file

vi /opt/custom/nsca/send_nsca.cfg


Now set the LD_LIBRARY_PATH variable and run the command

export LD_LIBRARY_PATH=/opt/custom/nsca; echo "host;passive_check;0;All seems to be OK" | /opt/custom/nsca/send_nsca -H nagios.ip -p 5667 -d ";" -c /opt/custom/nsca/send_nsca.cfg

nsca and send_nsca version incompatibility

I have a Nagios NSCA server running on Debian squeeze. The installed nsca package is the 2.7.2

I want to send passive nagios checks from a SmartOS zone. But the pkgsrc version of nsca client package is 2.9.1

There are incompatibility issues between the 2.7 server 2.7 and a 2.9 client (example http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670373).

Dropping packet with invalid CRC32 - possibly due to client using wrong password or crypto algorithm?

To resolve the problem without upgrading Debian to a newer release, you can use backports.
Following the instructions I've added a new source to apt

vi /etc/apt/sources.list.d/backports.list

deb http://mi.mirror.garr.it/mirrors/debian-backports squeeze-backports main

apt-get update

And I've installed the newer version of NSCA server.

apt-get -t squeeze-backports install nsca

Now the latest version of send_nsca available on SmartOS works.

Quick testing shows that the 2.7.2 clients seems to work with the 2.9.1 server.

nagios plugin to compare (master/slave) SOA records

This is a Nagios script to compare the master ns and the slave ns SOA records.
So you can know if the slave zone is expired, or is not in sync with the master.

http://exchange.nagios.org/directory/Plugins/Network-Protocols/DNS/checkexpire/details

https://github.com/alcir/checkexpire.sh