Pandora: Documentation en: Raspberry Monitoring

From Pandora FMS Wiki
Jump to: navigation, search

Raspberry logo.png Pandora logo.png

1 Objectives

  • Network connection and device configuration guide.
  • Pandora FMS agent and satellite installation on a Raspberry device.
  • Automatic creation Pandora FMS user, securing the ssh protocol.

2 Hardware Components

2.1 Raspberry

A Raspberry device is a reduced-plate computer, single-plate computer or low-cost single-plate computer (SBC). Its official operating system is an open source version adapted from Debian, called Raspbian.

Raspberry placa.png

2.2 Keyboard

USB-connected Keyboard

2.3 Monitor

Monitor with HDMI connector

3 Software

3.1 Pandora FMS image for Raspberry

The distributed image is based on the Raspbian operating system. It contains the agent, the satellite, the eHorus client, the packages to install a netflow probe and all their dependencies.

Raspbian.png Ehorus.png Pandora logo.png

4 Installation

4.1 Flashear imagen en la tarjeta SD

4.1.1 Download Pandora FMS official image for Raspberry

The initial step for installing it is to download the official Pandora FMS image for raspberry from the official download page: Official Download Form Once the .img file is downloaded, flash it onto your SD card of at least 4gb.

4.1.2 Download Etcher

To flash the image, use the Etcher software that can be downloaded at the Official Etcher Page and which works similarly on both Windows and Linux.

4.1.3 Process for flashing the image on the SD card

Select the image of Pandora FMS that you want to flash on the SD card by clicking on select image. This will open the file explorer to select the previously downloaded Pandora FMS image.

Etcher1.png

Select the SD card inserted in the computer. If the SD card is the one that appears by default, leave it as it is and if not, click on "change" and select the desired SD card.

Etcher2.png

Click on the Flash! button to mount the image on the card. Then, remove the card securely.

Etcher2.png

4.2 Hardware connection

Thorough this step, all the components will be connected to power up the Raspberry with the operating system:

  • Insert the SD card into the slot at the bottom of the box.
  • Connect the keyboard to any USB port
  • Connect the HDMI wire to the Raspberry monitor and HDMI port.
  • Connect the device to the power supply through the power wire.

4.3 Network configuration

The monitor will display how the device starts and an installer where you can select which interface you wish to configure.

4.3.1 DHCP

Select Eth0 to configure the wired network interface:

Cable1.png

It will ask whether you want to change the Eth0 interface settings

Cable2.png

Select DHCP in case there is a dhcp server in the network

Cable3.png

Then, a message will appear saying that the wired network has been correctly configured.

4.3.2 Static

Cable4.png

Select IP STATIC if you wish to configure the wired interface manually

Cable5.png

Enter the Raspberry static IP

Cable6.png

Enter the network Gateway

Cable7.png

Enter the network mask

Cable8.png

Enter the public DNS

Cable9.png

You will get a message that the configuration has been successfully completed

Cable10.png

4.3.3 Wireless DHCP

Select Wlan0 to configure the wireless network interface

Wifi1.png

It will ask whether you wish to change the Wlan0 interface configuration

Wifi2.png

Select DHCP in case there is a dhcp server in the network

Wifi3.png

Choose the name of the access point from the provided list

Enter the password of the access point

Wifi5.png

You will get a message that the configuration was successful

4.3.4 Wireless Static

Wifi6.png

Select WIFI STATIC if you wish to configure the wired interface manually

Wifi7.png

Choose the name of the access point from the provided list

Enter the password of the access point

Wifi9.png

Enter the device static IP

Wifi10.png

Enter the network mask

Wifi11.png

Enter the access point Gateway

Wifi12.png

You will receive a message saying the configuration was successful.

Wifi13.png

4.3.5 Exit the Installer

To exit the installer, go back to the main menu and press cancel.

Wifi14.png

4.4 Agent/Satellite Configuration

4.4.1 Agent

To install the agent, select AGENT from the menu

Agente1.1.png

It will ask for the IP of the Pandora FMS server the agent must point to

Agente2.2.png

Enter the existing group in the server to which you wish to add the agent

Agente3.3.png

4.4.2 Satellite

To install the satellite, select SATELLITE from the menu

Satelite1.png

It will ask for the IP of the Pandora FMS server the agent must point to

Satelite2.png

Enter the range of the network you wish to monitor along with its mask

Satelite3.png

Enter the community or list of SNMP communities of the devices in your network

Satelite4.png

Enter the user or list of users to make WMI queries to the computers on your network

Satelite5.png

5 Postinstallation

5.1 eHorus client Configuration

Edit the /etc/ehorus/ehorus.conf file and replace the "eh_user" token with your eHorus user. Uncomment the password secret line and replace it with a password to access your agent from eHorus.

Ehorus conf.png

To see the graphical environment, install the x11vnc dependency:

apt-get install x11vnc


Start the service with:

/etc/init.d/ehorus_agent_daemon start

5.2 Netflow Probe

Its operation is based on the use of several components:

  • A device with netflow compatibility, usually a switch or router type network hardware that generates information packets, or a netflow probe.
  • A netflow collector, which receives the packets generated by the previous device, storing and processing them. It is usually a tool or server with these features.

Pandora FMS uses an OpenSource tool called nfcapd to process all netflow traffic. This daemon is automatically launched by Pandora FMS server. This system stores data in binary files, in a certain location. Install nfcapd on your system before working with Netflow in Pandora FMS. The default nfcapd daemon listens on port 9995/UDP by default, so keep this in mind if you have firewalls to open this port and when configuring Netflow probes.

Netflow architecture.png

5.2.1 Netflow Probe via software

If you do not have a Netflow router, but your traffic "goes" through a Linux system, you can install a software that works as a probe and sends Netflow traffic information to the collector. In Linux, there is a program called fprobe that captures traffic and forwards it to a NetFlow server. With that you can generate Netflow traffic, from all network traffic going through your interfaces.

First, install fprobe:

apt-get install fprobe

It will ask which interface must be monitored and to which ip:port the information must be sent to. In case it does not ask, run it with the following command:

/usr/sbin/fprobe -i <interfaz_monitorizar> -fip <ip_colector>:<puerto>

In the following example, all traffic from the eth0 interface will be sent to the Netflow collector listening on port 9995 of IP 192.168.70.185:

/usr/sbin/fprobe -i eth0 -fip 192.168.70.185:9995

Once traffic is generated, you can view the statistics of this traffic on the Netflow collector with this command:

nfdump -R /var/spool/pandora/data_in/netflow

Netflow must be enabled to be accessible from the Operation and Administration menus: Habilitar netflow

Once the Netflow is configured, restart Pandora FMS server to boot the nfcapd server. It must be properly installed before attempting to start it. Check the server logs for any questions.

5.2.2 Netflow Probe with Port Mirroring

Explained in the section: Netflow Port Mirroring