Archives mensuelles : juillet 2014

Backup Exec plugin for check_mk

This check_mk plugin queries Backup Exec database to find job history, and returns the state of the last job execution.

It has been tested with Backup Exec 2010 and 2012, and should work with previous versions from 9.0 to 12.5. Backup Exec 2010 is required (see below)

checks

It has been tested on Windows 2008 R2, and should work on Windows 2012, and maybe Windows 2003 if powershell is installed.
Contrary to many Backup Exec plugins for Nagios, it is not a compiled executable but a simple powershell script, and doesn’t parse xml history files and so runs very fast.
It tries to connect on the local MSSQL instance named BEDB, which is the default configuration. In most cases, no configuration is needed, just copy backupexec_job.ps1 into check_mk « plugins » subdirectory.

The following performance data is returned to create graphs: Job size, duration, rate and deduplication ratio.

graph_backup_rate

graph_backup_time

Download from Check-MK Exchange

16/07/2014 : Version 1.1 – Added support for job status 9 (missed)

28/07/2014 : Version 1.2 – Added WATO plugin to treat jobs ‘completed with exceptions’ as OK

29/07/2014 : Version 1.3 – Added support for job status 21 (canceled, timed out)

02/04/2015 : For Backup Exec 12.5, you need to use backupexec_9-12.5_job on your windows server (thanks Guillermo).

25/06/2015 : Version 1.4 – Fixed error « “Check parameter definition for backupexec_job has type Dictionary, but match_type None” » with check_mk 1.2.7i (thanks Jörg !). Version 1.4 doesn’t work anymore with 1.2.6 or previous versions. Use backupexec_job-1.3 instead.

02/09/2015 : Version 1.5 – Fixed compatibility with both check_mk<=1.2.6 and check.mk>=1.2.5 (thanks Peter & François)

07/10/2015 : Version 1.6 – Fixed « ERROR: Skipping invalid manpage: backupexec_job (Catalog info missing) » in 1.2.7i3 (thanks to Daniel Müller)

Decodeur Altitude Meteotime 323

Hideki est un constructeur de station météos en marque blanche.
La station Hideki DV323 se retrouve vendue sous différentes marques, notamment:

Cette station possède une sonde thermomètre/hygromètre communiquant via RF433.
Mon objectif était de capter et décoder ce signal pour le traiter sur un PC.
Il existe de nombreux projets Arduino allant dans ce sens, semblables à celui-ci.
Le protocole Hideki est connu et décodé, mais ce n’est manifestement pas celui utilisé par la station Meteotime.

Je me suis donc fortement inspiré de cette page afin de décoder le signal.

Une capture via la carte son m’a permis d’identifier un signal « propre » :

meteotime-signal-1

et, en zoomant, d’identifier les caractéristiques du signal :

meteotime-signal-2

soit une période d’environ 1220 µs.
Parfait : J’avais 64 bits utilisables.
Je suis donc parti du principe qu’un 0 était plus longtemps « en haut » qu’un 1 :

0: |---|_  : 839 µs - 362 µs
1: |-|___  : 362 µs - 839 µs

Afin de faciliter le travail, j’ai écrit un bout de code Arduino qui, avec le montage de PracticalArduino, a permis d’effectuer différents relevés.

J’ai ainsi pu identifier les bits significatifs :

                                       |> >> | >>>  |>>>        |> >> | >>>
                                       dd dd t ttt  TTTT        hh hh H HHH
       0123 4567 8901 2345 6789 0123 4567 8901 2345 6789 0123 4567 8901 2345 6789 0123
       0           1            2           3            4           5            6

Où:

  • dddd : valeur décimale de la température
  • tttt : température (unités)
  • TTTT : température (dizaines)
  • hhhh : hygrométrie (unités)
  • HHHH : hygrométrie (dizaines)

Exemple :

       0000_0000 0000_0001 1000_1000 0101_0010 1001_0100 1011_1111 0011_0101 1000_1000 22.2°C 53%

Les autres bits sont toujours identiques, on y retrouve probablement l’identifiant de l’émetteur et du bourrage.
Il me reste à identifier le bit pour les températures négatives, on verra cet hiver 😉

Mise à jour 27/07/2014 : Mon émetteur a rendu l’âme il y a bien longtemps, je n’ai jamais finalisé le code.
Le voici donc en l’état :
Code Arduino Meteotime RF

Il est fonctionnel, le montage est un récepteur RF433 Arduino classique