Tag: raspberry

  • Raspberry Pi wireless setup

    Raspberry Pi wireless setup

    I have now recieved my wireless usb nano adapters from China. They were bought from DX.com and is tiny, and believe me they are very tiny.

    After some small failures setting up these cards with static IP I found some help around the web, and this config worked for me on my network using wpa-psk as security on the wireless.

    nano /etc/network/interfaces —> create following lines.

    #allow-hotplug wlan0
    auto wlan0
    iface wlan0 inet static
    address          192.168.11.32
    netmask        255.255.255.0
    broadcast      192.168.11.255
    gateway         192.168.11.1
    name-servrs 192.168.11.1
    wpa-essid      secret
    wpa-psk         secret2

    Have fun

  • Raspberry pi steampunked

    Raspberry pi steampunked

    Mit næste lille projekt bliver at bygge en af mine to raspberry pi computere ind i en anden skal, end den jeg bestilte med. Tema bliver steampunked, og udgangspunktet er Frank’s gamle Kamera som er et Bilora Bella DC4 Vario fra 1959.

    Kameraet har ikke virket de sidste 15 år og er lidt anløben hist og her, men mon ikke jeg kan få en god computer ud af det.

    Version 1 bliver at få plads til Raspberry’en inde i selve kamera huset, og første udfordring er få det åbnet ordentligt. Version 2 bliver med kamera, når Raspberry Foundation frigiver deres kamera til RPI’en.

    image

    image

    image

    image

    Men nyd billederne af et 54 år gammelt kamera.

  • Nagios on Raspberry Pi

    Nagios on Raspberry Pi

    A quick guide to install the normal Nagios via apt-get on an Raspberry PI using the standard Raspbian OS.

    – Preliminary; I have bought 2 Raspberry PI’s version B with 512MB RAM. The first is going to be used for Nagios monitoring of my home appliances which has grown to an incredible 45 devices. I’ve been reading through a lot of blogs describing how to compile the Nagios from bottom-up. The 1st RPI also servers as a portal server for my guest wifi, not that I have that many guests, but I wanted to make som fun to. The second RPI is going to be used as an Ubiquiti Unifi server compiled from scratch with the soft-floating Raspbian image and Mongodb, more on this in a later article.

    I took a different approach, as I wanted to make the install as simple as possible, so I’ve used the common software found through apt-get. And yes I do know Nagios is not the latest version, but I do not care about as it is running a decent version 3.4.1.

    Some things to consider before going down this path:

    • Make an static IP, this makes it easier to reach.
    • Enable SSH from the install screen

    Now let’s install (all this is done via SSH as my RP is headless), I do assume you have installed the Raspbian image on the SD-card, plugged in the network cable,SD-card and power)

    1. apt-get update
    2. apt-get upgrade (now the RPI is up to date but might take some time)
    3. apt-get install nagios
    4. It will ask you for an password for nagiosadmin.

    Now all done 🙂 You can login to http://ip-of-your-server/nagios3  using nagiosadmin and the password you issued.

    If you have encountered some Nagios installations before, be aware the files you need to use are not in the usual spots as described on Nagios.org

    • /etc/nagios3 – this is your primary folder  where e.g. commands.cfg resides.
    • /etc/nagios3/conf.d/ – this is the folder for all your config files. I used these for the basic monitoring tasks.
    • /etc/nagios-plugins  – home of all the native plugins like http_check

    I needed to check http status of some surveillance cams which I have choosen to monitor on other ports than the normal port 80 (web).
    For this to be succesfull you will have to edit /etc/nagios-plugins/config/http.cfg and insert following $ARG$ to the end of the line like this;

    # ‘check_http’ command definition
    define command{
            command_name    check_http
            command_line    /usr/lib/nagios/plugins/check_http -H ‘$HOSTADDRESS$’ -I ‘$HOSTADDRESS$’ ‘$ARG1$’
            }

    Then make another file for these devices, I’ve used services.cfg

    define service{
            use             generic-service         ; Inherit default values from a template
            host_name               name-of-your-machine
            service_description     HTTP:PORT
            check_command   check_http!-p 10000 ;with 10000 as the port you want to monitor for http service
    }

    Presumably you have a host file named hostname.cfg with following basic input

    define host {
    use             generic-host
    host_name      name-of-your-machine
    address         192.168.1.2
    }

    Then save all your work and service nagios3 restart and refresh your browser.