Arduino and Nagios Integration for Monitoring

23
Arduino and Nagios Integration for Monitoring ıctor Fern´ andez, Antonio Pazos, Juan Saborido and Marcos Seco Universidade de Santiago de Compostela October 14, 2013

Transcript of Arduino and Nagios Integration for Monitoring

Page 1: Arduino and Nagios Integration for Monitoring

Arduino and Nagios Integration for Monitoring

Vıctor Fernandez, Antonio Pazos, Juan Saborido and Marcos Seco

Universidade de Santiago de Compostela

October 14, 2013

Page 2: Arduino and Nagios Integration for Monitoring

Contents

1 IntroductionCommercial SolutionsOpen hardware/Software solutionsNagiosArduino

2 ImplementationSoftwareHardwareProject Costs

3 Results

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 2 / 11

Page 3: Arduino and Nagios Integration for Monitoring

Introduction Commercial Solutions

Commercial Solutions

Advantages

Highly integrated environments

Sensors and controllers nicely packaged

Support

Wide range of sensors available

Disadvantages

Expensive for small Data-Centers (≤ 10 Racks?)

APC: ∼ 370e+ sensors (> 30e each)AVTech: ∼ 110e+ 1 sensor (> 25e)ServersChecks: ∼ 180e+ 1 sensor (> 45e)Domodesk: ∼ 480e+ sensors

Expanding them requires, some times, to buy from the same vendor

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 3 / 11

Page 4: Arduino and Nagios Integration for Monitoring

Introduction Open hardware/Software solutions

Open hardware/Software solutions

Pros

They can be highly integrated environments

Highly customizable by the user

Affordable.

Wide range of sensors available

Can be bought as a full solution

Cons

Lots of work if DIY:

Software: Arduino, sensors and control programsHardware: some soldering

Lack of support if DIY

Could be expensive if bought from a vendor

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 4 / 11

Page 5: Arduino and Nagios Integration for Monitoring

Introduction Nagios

Nagios

It is a well known open source monitoringsolution

High number of sensors already available

Easy to create new sensors

Plenty of add-ons to extent basicfunctionality

It is the monitoring software we have beenusing for ∼10 years

SNMP

Current Load

Current Users

Disk use

HTTP

CVMFS

Ping

SSH

etc...

Warning?

Critical?

Meassurement

Critical Message

No

Warning Message

Message|perf data

No

exit(0)

exit(1)

exit(2)

Start

Yes

Yes

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 5 / 11

Page 6: Arduino and Nagios Integration for Monitoring

Introduction Nagios

Nagios

It is a well known open source monitoringsolution

High number of sensors already available

Easy to create new sensors

Plenty of add-ons to extent basicfunctionality

It is the monitoring software we have beenusing for ∼10 years

SNMP

Current Load

Current Users

Disk use

HTTP

CVMFS

Ping

SSH

etc...

Warning?

Critical?

Meassurement

Critical Message

No

Warning Message

Message|perf data

No

exit(0)

exit(1)

exit(2)

Start

Yes

Yes

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 5 / 11

Page 7: Arduino and Nagios Integration for Monitoring

Introduction Nagios

Nagios

It is a well known open source monitoringsolution

High number of sensors already available

Easy to create new sensors

Plenty of add-ons to extent basicfunctionality

It is the monitoring software we have beenusing for ∼10 years

SNMP

Current Load

Current Users

Disk use

HTTP

CVMFS

Ping

SSH

etc...

Warning?

Critical?

Meassurement

Critical Message

No

Warning Message

Message|perf data

No

exit(0)

exit(1)

exit(2)

Start

Yes

Yes

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 5 / 11

Page 8: Arduino and Nagios Integration for Monitoring

Introduction Nagios

Nagios

It is a well known open source monitoringsolution

High number of sensors already available

Easy to create new sensors

Plenty of add-ons to extent basicfunctionality

It is the monitoring software we have beenusing for ∼10 years

SNMP

Current Load

Current Users

Disk use

HTTP

CVMFS

Ping

SSH

etc...

Warning?

Critical?

Meassurement

Critical Message

No

Warning Message

Message|perf data

No

exit(0)

exit(1)

exit(2)

Start

Yes

Yes

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 5 / 11

Page 9: Arduino and Nagios Integration for Monitoring

Introduction Nagios

Nagios

It is a well known open source monitoringsolution

High number of sensors already available

Easy to create new sensors

Plenty of add-ons to extent basicfunctionality

It is the monitoring software we have beenusing for ∼10 years

SNMP

Current Load

Current Users

Disk use

HTTP

CVMFS

Ping

SSH

etc...

Warning?

Critical?

Meassurement

Critical Message

No

Warning Message

Message|perf data

No

exit(0)

exit(1)

exit(2)

Start

Yes

Yes

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 5 / 11

Page 10: Arduino and Nagios Integration for Monitoring

Introduction Arduino

Arduino

It is a simple microcontroller board and adevelopment environment

It was designed to be:

InexpensiveCross-platformTo have a Simple, clear programming environmentOpen source and extensible softwareOpen source and extensible hardware

Its capabilities can be extended with the use ofshields, that is, boards that can be plugged on topof the Arduino.

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 6 / 11

Page 11: Arduino and Nagios Integration for Monitoring

Introduction Arduino

Arduino

It is a simple microcontroller board and adevelopment environment

It was designed to be:

InexpensiveCross-platformTo have a Simple, clear programming environmentOpen source and extensible softwareOpen source and extensible hardware

Its capabilities can be extended with the use ofshields, that is, boards that can be plugged on topof the Arduino.

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 6 / 11

Page 12: Arduino and Nagios Integration for Monitoring

Introduction Arduino

Arduino

It is a simple microcontroller board and adevelopment environment

It was designed to be:

InexpensiveCross-platformTo have a Simple, clear programming environmentOpen source and extensible softwareOpen source and extensible hardware

Its capabilities can be extended with the use ofshields, that is, boards that can be plugged on topof the Arduino.

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 6 / 11

Page 13: Arduino and Nagios Integration for Monitoring

Implementation Software

Software

Nagios

Nagiosgraph

Nagios Server

Sensor(python)

Sensors

Information flow

Server

SNMP Relay(perl)

Query Arduino(python)

Critical Temp?

Arduino+GSM shield

Send SMS

Query Sensor

Critical?

Request

Response

SerialSSH

Node 1

SNMP Trap Handler(perl)

Node 2

SNMP Trap Handler(perl)

Node 3

SNMP Trap Handler(perl)

Node 1

SNMP Trap Handler(perl)

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 7 / 11

Page 14: Arduino and Nagios Integration for Monitoring

Implementation Software

Software

Nagios

Nagiosgraph

Nagios Server

Sensor(python)

Sensors

Information flow

Server

SNMP Relay(perl)

Query Arduino(python)

Critical Temp?

Arduino+GSM shield

Send SMS

Query Sensor

Critical?

YesRequest

Response

SerialSSH

Node 1

SNMP Trap Handler(perl)

Node 2

SNMP Trap Handler(perl)

Node 3

SNMP Trap Handler(perl)

Node 1

SNMP Trap Handler(perl)

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 7 / 11

Page 15: Arduino and Nagios Integration for Monitoring

Implementation Software

Software

Nagios

Nagiosgraph

Nagios Server

Sensor(python)

Sensors

Information flow

Server

SNMP Relay(perl)

Query Arduino(python)

Critical Temp?

Yes

Arduino+GSM shield

Send SMS

Query Sensor

Critical?

Request

Response

SerialSSH

Node 1

SNMP Trap Handler(perl)

Node 2

SNMP Trap Handler(perl)

Node 3

SNMP Trap Handler(perl)

Node 1

SNMP Trap Handler(perl)

Shutdown trap

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 7 / 11

Page 16: Arduino and Nagios Integration for Monitoring

Implementation Software

Software

Nagios

Nagiosgraph

Nagios Server

Sensor(python)

Sensors

Information flow

Server

SNMP Relay(perl)

Query Arduino(python)

Critical Temp?

Arduino+GSM shield

Send SMS

Query Sensor

Critical?

Request

Response

SerialSSH

Node 1

SNMP Trap Handler(perl)

Node 2

SNMP Trap Handler(perl)

Node 3

SNMP Trap Handler(perl)

Node 1

SNMP Trap Handler(perl)

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 7 / 11

Page 17: Arduino and Nagios Integration for Monitoring

Implementation Hardware

Hardware

75

IK B

1 2 3 4

VIN

EO

C

GN

D

XC

LR

SD

A

SC

L

BMP085PRESSURESENSOR

DS18B20

DS18B20

DS18B20

DS18B20DS18

B20

DS18B20

DS18B20

DS18B20

DS18B20DS18

B20

DS18B20

DS18B20

0123456789

10

11

12

13

A0

A1

A2

A3

A4

A5

6 A7

A8

A9

A1

0

A1

1

A1

2

A1

3

A1

4

A1

5

22

24

26

28

30 31

32 33

34 35

36 37

38 39

4140

4342

45

47

49

51

44

46

50

48

5352

L

RXTX

ANALOG IN

COMMUNICATION

POWER

AR

EF

GN

D

TX

0

RX

0

RES

ET

3V

3

5V

VIN

GN

D

GN

D

SD

A 2

0

SC

L 2

1

TX

2 1

6

RX

2 1

7

RX

3 1

5

TX

3 1

4

RX

1 1

9

TX

1 1

8

MADE IN

ITALY

PWM

5V

GND

DIG

ITA

L

MEGA

IOR

EF

ON

GroundVoltageDataCLK/SCL

Humidity Sensor

Pressure Sensor Temperature Sensors

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 8 / 11

Page 18: Arduino and Nagios Integration for Monitoring

Implementation Hardware

Hardware

75

IK B

1 2 3 4

VIN

EO

C

GN

D

XC

LR

SD

A

SC

L

BMP085PRESSURESENSOR

DS18B20

DS18B20

DS18B20

DS18B20DS18

B20

DS18B20

DS18B20

DS18B20

DS18B20DS18

B20

DS18B20

DS18B20

0123456789

10

11

12

13

A0

A1

A2

A3

A4

A5

6 A7

A8

A9

A1

0

A1

1

A1

2

A1

3

A1

4

A1

5

22

24

26

28

30 31

32 33

34 35

36 37

38 39

4140

4342

45

47

49

51

44

46

50

48

5352

L

RXTX

ANALOG IN

COMMUNICATION

POWER

AR

EF

GN

D

TX

0

RX

0

RES

ET

3V

3

5V

VIN

GN

D

GN

D

SD

A 2

0

SC

L 2

1

TX

2 1

6

RX

2 1

7

RX

3 1

5

TX

3 1

4

RX

1 1

9

TX

1 1

8

MADE IN

ITALY

PWM

5V

GND

DIG

ITA

L

MEGA

IOR

EF

ON

GroundVoltageDataCLK/SCL

Humidity Sensor

Pressure Sensor Temperature Sensors

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 8 / 11

Page 19: Arduino and Nagios Integration for Monitoring

Implementation Hardware

Hardware

75

IK B

1 2 3 4

VIN

EO

C

GN

D

XC

LR

SD

A

SC

L

BMP085PRESSURESENSOR

DS18B20

DS18B20

DS18B20

DS18B20DS18

B20

DS18B20

DS18B20

DS18B20

DS18B20DS18

B20

DS18B20

DS18B20

0123456789

10

11

12

13

A0

A1

A2

A3

A4

A5

6 A7

A8

A9

A1

0

A1

1

A1

2

A1

3

A1

4

A1

5

22

24

26

28

30 31

32 33

34 35

36 37

38 39

4140

4342

45

47

49

51

44

46

50

48

5352

L

RXTX

ANALOG IN

COMMUNICATION

POWER

AR

EF

GN

D

TX

0

RX

0

RES

ET

3V

3

5V

VIN

GN

D

GN

D

SD

A 2

0

SC

L 2

1

TX

2 1

6

RX

2 1

7

RX

3 1

5

TX

3 1

4

RX

1 1

9

TX

1 1

8

MADE IN

ITALY

PWM

5V

GND

DIG

ITA

L

MEGA

IOR

EF

ON

GroundVoltageDataCLK/SCL

Humidity Sensor

Pressure Sensor Temperature Sensors

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 8 / 11

Page 20: Arduino and Nagios Integration for Monitoring

Implementation Project Costs

Project Costs

Our project:

1 Arduino Mega 2560 46e

1 GSM Shield 97e

24 DS18B20 (Temperature) 198e

1 Sensirion SHT75 (Humidity) 40e

1 Bosch BMP085 (Pressure) 23e

2 Prototype boards with continuous strips 20e

Total 424e

Other vendors (without GSM): APC∼ 1000e, AVTech∼ 1200e,ServerChecks∼ 1300e

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 9 / 11

Page 21: Arduino and Nagios Integration for Monitoring

Results

Results

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 10 / 11

Page 22: Arduino and Nagios Integration for Monitoring

Results

Results

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 10 / 11

Page 23: Arduino and Nagios Integration for Monitoring

Results

Results

TemperatureDay

Month

Daily Pressure

Week

Year

Daily Humidity

V. Fernandez, A. Pazos, J. Saborido and M. Seco Arduino and Nagios Integration for Monitoring October 14, 2013 11 / 11