UNIX

Sending SMS from Nagios

logo

Sometimes you need to be able to send SMS from a computer. This is obvious when you’re talking of monitoring your servers. Email alerts are good, but what if you’re sleeping ?
I used to set up a SMS modem, with it’s own SIM card and subscription. This is really easy, using smsd daemon, to send SMS. Just put a formated file in a directory and bam!, you SMS is fired.
But what when you can’t set a SMS Modem in a datacenter ?

Then you have to use an online SMS provider.

  • Good
  • you just have to call an API to send a SMS

  • BAD
  • it’s not free (you pay per SMS when the modem can have an unlimited SMS sending subscription
    it is network dependant ; if you have a network failure, you will never be informed

    Lire la suite de l’article »

    Euphonix MC Transport config files

    Check my articles about Euphonix’s MC Transport controler here and there.
    If you install the software for every user on the computer (maybe you don’t have the choice, can’t remember), every defined application will have a corresponding preference file.
    On my computer they are in « /Library/Application Support/Euphonix/UserSets/MC2User/MC_USER_SET__Root »

    prunemp:tmp prune$ ls -l /Library/Application\ Support/Euphonix/UserSets/MC2User/MC_USER_SET__Root
    total 744
    -rw-r–r–  1 prune  admin  174271  1 nov 18:01 Final Cut Pro.xml
    -rw-r–r–  1 prune  admin   74407 25 oct 02:23 Safari.xml
    -rw-r–r–  1 prune  admin   50407  1 nov 20:09 VLC.xml
    -r–r–r–  1 prune  admin   21894 21 avr  2009 default.xml
    -rw-r–r–  1 prune  admin   45115 25 oct 02:40 iTunes.xml

    Lire la suite de l’article »

    Euphonix MC Transport usage [EDIT]

    Second part of the test.

    First thing to do is register your controler. Go the the Euphonix support’s website.
    My Euphonix
    This is where you’ll find the software download, the email support link and the docs.

    When everything is working, as explained in previous post, you should have the green « € » in the top right of the menu, and the controler should display the name of the software you are actualy using (safari ? firefox ?)

    I had some controler « freeze » at some point. Then, the controler keeps displaying the same application name, whichever application is in focus. For the moment, the only solution I found is to power-off the controler, go in the EuControl settings (the only way to get acces to the menu) and quit.
    Then, restart the EuControl application, wait until the menu icon stop rolling, then power-on the controler.
    As I said, I emailed the support about that without any real answer. I openned a new case today… we’ll see…

    If you are using a supported application the controler comes pre-configured. This is not the case for most basic applications like Safari, Firefox, iTunes or even the finder.
    While the MC Transport is not made for that specificaly, configuring these applications will help us understand how the controler work.

    Basic notions :

  • accessing the configuration
  • EuControl Settings EuControl Settings-1
    you have two ways to do that : clic on the green icon in the menu and go to the settings -> « soft keys » tab or, simply, clic on the « eye » key on the controler, at the lower left of the keypad.

  • activating the jog/shuttle
  • Before beeing able to use the jog or shuttle you have to enable it. Most of the time the activation key is the first soft key for the jog and the second for the shuttle. When switching into an application, every key should be off (no light). clic again to activate

  • changing the color of transport keys
  • Colors
    You can change the color of the transport keys (the one arount the shuttle). The 2 first and 2 last keys can be yellow or red. The 3 keys in the middle can be yellow or green. For the moment, I haven’t found a way to light a key or change its color depending on the action. I openned a case to the support to have more informations. For example, keeping the key green while pressed, or changing the color at every clic… Another request, which may be linked, is having two actions for the same key. This way, you can have a yellow key. When first clic, send the « play » shortcut of the application and turn to red. When pressed again, send the « stop » or « pause » keystroke and turn back to yellow… I hope the support will give a clue on how to do that, or add support in the next software release :)

    The pdf manual will lead you through the configuration process, which is really easy for the basic stuffs. Let’s write down a walkthrough…
    All this is done in the configuration software, not the controler.

    - select the button to assign
    - give a name in the « soft key label » box AND press enter to validate
    - change the font or color if needed
    - clic on « command… » or double-clic on the button
    - clic on the « add » menu and select what to do. Most of the time it will be « key », and if you want to make the button an activation button for the jog or shuttle, use « wheel »
    - enter a keystroke or a list of them. Doing this enable you to do scripts
    - you can add more option, again, to script the button

    If you’re programming the button to activate the wheel, select wheel and a custom function.
    If you’re programming the wheel, you have to :
    - clic on the « + » sign and give a name to the « command »
    - as you do when programming a key, add a keystroke or another function. This will be used when turning the wheel right (clockwise) by default
    - clic on the « turn jog right » menu and change to « turn jog left »
    - add the keystroke used when turn anti-clockwise

    If you’re programming the shuttle, this is a little bit different. You can add action for each of the 15s step of the wheel (-7 -> 0 -> +7) and for each transition (0 ->1, 1->2 …) and the other way around (2->1, 1->0…)

    These are the basics. I’ll try to give examples in the next post :)

    [EDIT]
    Now that I have my disk array working, I had another try.
    Once again, the MC Transport stayed locked on the « Mail » application. This is not the first time, and for the moment, the only answer from the support was « disable firewall in your mac » and « start the audio mixer of FCP ». These answers were done after 10 days, or more. Seriously, Euphonix, what are you doing here ?

    If this happen to you, follow these steps :
    - power off the MC Transport
    - go in the green « € » icon -> « EU Control Settings »
    - go to the menu and quit
    - poweron the MC Transport and wait until the « Euphonix » logo appear
    - start the EU Control application. The menu icon should turn to green.

    For the moment, while the hardware is perfectly built, I can’t say the software is working fine… If you haven’t bought yet, WAIT !
    Euphonix team, if you read this, I’m willing to spend some time debugging for you. Just provide me a beta software, or one with extra debug. But please, stop giving stupid answers.

    12Tb RAID for cheap with Hitachi 2Tb drives

    brand It’s been some time now that i’m fighting with Seagate for they damn 1.5To drives not working as they should.
    Hitachi finaly released 2Tb drives with good throughoutput and price.
    While trying not to be screwed a second time, I started buying only 2 drives. Grosbill, a french reseller, have them for 164€. These two were labelled from August 2009, with firmware 10D.
    As everything was working fine, with slightly better results than the 1.5Tb Seagate drives (without RAID, of course), I bought 6 more from Macway. They used to be specialised in Apple hardware but now have standard hardware with really good price : 157€. These drives were labeled September 2009 with firmware 20N. Hopefully, they also work as expected : they did not break the compatibility in firmware upgrade :)

    For the moment I havn’t seen any manual firmware upgrade tool to have every drives in the same version. Actualy, this is even better : if you can, always choose drives with different firmware and series for RAID arrays : you will not have all your drives failing in case of a bug related to the production.

    Lire la suite de l’article »

    Hitachi 2To 3.5″ (HDS722020ALA330)

    medium Remember few months ago, in april, I changed my old G5 Powermac for the new Nehalem 2009, with an external hard drive enclosure of 10Tb.
    At that moment, the Seagate 1.5Tb drive was the biggest one availlable, and with far better throughoutput than the 1Tb drives availlable.

    The problem is that this Seagate drive (ST31500341AS) does not work with hardware RAID, and as reported on Seagate forums, with a lot or S-ATA controlers. See how people are complaining there. Solution : NEVER BUY SEAGATE DRIVES AGAIN !!!!

    Today I went to the store and grab two of the new Hitachi 2Tb drives :
    Lire la suite de l’article »

    computer stuffs…

    The main purpose of this blog is to act as a reminder, a todo. Here are things i’ve just found and needs a second look at, or more, a testing.

  • Human readable Glassfish Log
  • This is a shell (sh) script that should made things easier when having a look or doing a « tail -f » at Glassfish error logs.

  • Rajeshwar’s Weblog
  • This is a blog, lately talking about Glassfish V3 REST api implementation. As far as I know this is (still) not working with GF v2, which already have JMX and, if you’re a registered Sun user, SNMP. But worth having a look.

  • Beet
  • It seems to me that most of developpers are using Spring framework nowadays. This tool should enable them (or force them ?) to have a deeper look of what the framework is actualy doing. Seriously, comments welcome. May be the weapon of choice for sysadmins like me, dealing with developpers who hide behing their framework (like if the framework was an excuse… huhuhu).

  • PandoraFMS
  • Another monitoring software… well… to be tested.

  • Oracle Database-backed iGoogle Gadgets
  • An interesting thing you can do with Google’s API… It should with any database, but hey, a free software working with Oracle is worth beeing mentioned :)

  • Other Oracle related articles
  • Oracle TimesTen In-Memory Database
  • This is a PDF file dealing with TimesTen Database. This is a product newly (2 or 3 years) bought by Oracle, and well integrated. Embed the database close to the application, in the application server. Data are replicated at startup. You can choose which database, which table, which data using a filter, or even do transformations to the data. You select the synchronization frequency and there you go. I had a session OOW 2009 about that and how it was used to break a CDN application in two parts : one for slow data change (read/write to the DB) and one for massive fast queries on the delivery side. Ok, this use a lot of RAM… but RAM is cheap isn’t it ?

    Now we have some cool things to read and test, don’t we ? :)

    Oracle 11g R2 on Linux Fedora

    otn_logo_small
    This is my first attempt at Oracle 11g with Linux. As I’m still waiting for the 11G R2 to be released on Solaris, I managed to have a try on a Linux VM.

    First, get VirtualBox
    Then, get a Fedora 11 image
    You may also need a « z7″ compressor to un-z7 the image. You can get 7za from the Macports

    # port install p7zip
    # 7za e fedora-11-x86.7z

    7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
    p7zip Version 9.04 (locale=utf8,Utf16=on,HugeFiles=on,2 CPUs)

    Processing archive: fedora-11-x86.7z

    Extracting Machine/fedora-11-x86/fedora-11-x86.xml
    Extracting VDI/fedora-11-x86.vdi
    Extracting VDI
    Extracting Machine/fedora-11-x86
    Extracting Machine

    Everything is Ok

    Folders: 3
    Files: 2
    Size: 4740698220
    Compressed: 1148257214

    Then configure and start the VM. I had to add 3 NICs, so I have 4 network interfaces, enough to play. I also set the first one as Bridge instead of the default NAT, so my VM have a real IP.
    I then have to log as root, chance the /etc/sudoers so Wheel users can sudo. Then I added fedora (default user) to Wheel group in /etc/groups.
    Now I can sudo. We are close to be able to install Oracle database. While I’m at it, go to Oracle website and download the 2 install zip files. This is quite huge, around 2.1Gb. Be carefull when you unzip (not yet), as everything lives in the « database » folder…
    You will also need the Grid Infrastructure Software.
    Please note we are installong the 32bits versions, but the 64bits version is the same, only the packages to download are different. Click on the « view all » to get the Grid Infrastructure Software.

    For Oracle 11G R2 to work on linux you need to fulfill some dependencies, starting with some RPM packages. Use ‘yum’ to search for them and install them. Here is a list according to Oracle Linux recommendations :

    binutils-2.17.50.0.6
    compat-libstdc++-33-3.2.3
    compat-libstdc++-33-3.2.3 (32 bit)
    elfutils-libelf-0.125
    elfutils-libelf-devel-0.125
    gcc-4.1.2
    gcc-c++-4.1.2
    glibc-2.5-24
    glibc-2.5-24 (32 bit)
    glibc-common-2.5
    glibc-devel-2.5
    glibc-devel-2.5 (32 bit)
    glibc-headers-2.5
    ksh-20060214
    libaio-0.3.106
    libaio-0.3.106 (32 bit)
    libaio-devel-0.3.106
    libaio-devel-0.3.106 (32 bit)
    libgcc-4.1.2
    libgcc-4.1.2 (32 bit)
    libstdc++-4.1.2
    libstdc++-4.1.2 (32 bit)
    libstdc++-devel 4.1.2
    make-3.81
    sysstat-7.0.2
    unixODBC-2.2.11
    unixODBC-2.2.11 (32 bit)
    unixODBC-devel-2.2.11
    unixODBC-devel-2.2.11 (32 bit)

    11G R2 now comes with a « bundeled NTP server », I mean, Oracle now can sync the time of every node in the cluster. No need of NTPD, and no evictions due to bad Solaris xntpd server. Just disable ntpd or ensure it’s not running before installing Oracle database.
    Also, configure SSHD and kernel parameters, if needed, as Oracle prerequisite.
    Now, let’s go with Oracle. Create an oracle user with :

    adduser oracle
    passwd oracle (give a password)

    As root, create a /opt/oracle folder and give RWX rights to oracle user.
    Create a SSL key for user Oracle, add your personal public key to authorized_keys and log as oracle user. Copy the Oracle install files to the home dir of this user.

    mkdir /opt/oracle
    chown oracle /opt/oracle
    su – oracle
    ssh-keygen -f dsa
    (set empty password and write the key in .ssh folder)
    vi .ssh/authorized_keys
    (copy the pubkey of your admin user)
    unzip linux.x64_11gR2_grid.zip
    unzip linux_11gR2_database_1of2.zip
    unzip linux_11gR2_database_2of2.zip
    cd database

    Log-in again with your oracle user, setting X11 forwarding (use -X -Y if you are using a mac) :

    ssh -X -Y oracle@your_host
    cd grid

    cd database
    ./runInstaller

    Starting Oracle Universal Installer…

    Checking Temp space: must be greater than 80 MB. Actual 9828 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 1023 MB Passed
    Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-09-18_09-47-50AM. Please wait …[oracle@localhost database]$ Xlib: extension « Generic Event Extension » missing on display « localhost:10.0″.

    Don’t take account for X11 errors, as long as you have the install window.
    First question is giving out your email address for security updates… As you ARE a good DBA/Sysadmin, you won’t need this. Click next :)

    As I don’t have time and I KNOW I will not do better, check there for some more informations on installing Oracle 11G R2 RAC ASM.

    80′s computing

    Today we found two keys. They appear to be from the safty deposit from the sublevels of the company I’m working for. We had a look at the lockers.
    They appera to be untouched since 1996. And this is what we discovered inside :
    21042009006 21042009005
    These are just brand old 1980′s HARD DRIVES. Unfortunatly I don’t have an actual hard drive to compare, but these are really big and heavy. Around 40cm diameter and almost 30cm high for the biggest, estimated at around 40Mb data space :)

    Of course, as this is not usable anymore, I decided to take one into pieces :
    21042009001 21042009
    21042009002 21042009003
    21042009004 21042009007

    New MacPro Nehalem and 10To Raid5 Array

    overview
    I bought a dual 2GHz Powermac G5 when it first came out, almost 6 years ago. I never had a problem with it. It’s still working as a charme. But, when you’re working with HD footage, it gets a real pain !

    One of my best friend always tell me : « buy, don’t wait ». But I chosed to wait a little bit for the new Macpro Nehalem. And it finaly happened : http://www.apple.com/macpro/
    Lire la suite de l’article »

    Flashing an Amino Set Top Box

    Amino company and resellers are really quiet about all the possibilities of the product.
    I made a post some time ago about configuring the Amino to boot with DHCP and get the config through this or through DHCP.
    This post was really popular and people began to ask me for firmware and informations on how to upgrade. Of course, I can’t provide anything like firmware. My reseller here is France is OK to sell it for 10€ for 4 Amino stb… Or you can find it somewhere on Internet. Please, don’t ask for it, I don’t have the latest nor the Opera firmware.

    Lire la suite de l’article »