Pandora: Documentation en: Tentacle: UserGuide

From Pandora FMS Wiki
Jump to: navigation, search

1 Tentacle User Guide

Template wip.png

We are working on the translation of the Pandora FMS documentation. Sorry for any inconvenience.

 


1.1 Installing the PERL version

1.1.1 Installing from SVN

To install both the client and the server run:

$ svn co http://svn.code.sf.net/p/tentacled/code/trunk/perl/ tentacle
$ cd tentacle
$ perl Makefile.PL
$ make
# make install

To install just the client run:

$ svn co http://svn.code.sf.net/p/tentacled/code/trunk/perl/client
$ cd client
$ perl Makefile.PL
$ make
# make install

To install just the server run:

$ svn co http://svn.code.sf.net/p/tentacled/code/trunk/perl/server
$ cd server
$ perl Makefile.PL
$ make
# make install

If you want to install to a custom location, substitute:

$ perl Makefile.PL

with:

$ perl Makefile.PL PREFIX=/custom/location

A # means you need root privileges to run the command that follows.

1.1.2 Manual Install

If make is not available in your system, you can manually copy the files tentacle_client and tentacle_server to the appropriate place (for example, /usr/local/bin).

In this case, if the Perl binary is not located at /usr/bin/perl edit both files and change the first line so that it points to the right location.

1.1.3 IPv6 support

Tentacle also supports IPv6. When you want to use IPv6 connection, the perl module 'IO::Socket::INET6' should be installed. If it is not installed, IPv6 support is disabled (tentacle supports IPv4 only).

1.2 Installing the C version

1.2.1 Installing from SVN

To install the Tentacle client run:

$ svn co http://svn.code.sf.net/p/tentacled/code/trunk/c/ tentacle
$ cd tentacle
$ ./configure
$ make
# make install

Be sure to check the configure output for errors, missing headers etc.

To disable OpenSSL support, enabled by default if the OpenSSL development libraries are found, substitute:

$ ./configure

with:

$ ./configure --disable-ssl

A # means you need root privileges to run the command that follows.

1.3 Sample Usage

To view all the options available run:

$ tentacle_client -h
$ tentacle_server -h

Default values for all options will be shown.

For all the examples below, the server is located at address 192.168.1.1 and the client private key file is not password protected.

Simple file transfer with maximum file size set to 1MB:

$ tentacle_server -m 1048576 -s /tmp -v
$ tentacle_client -a 192.168.1.1 -v /bin/bash

Simple file transfer on port 65000 with file overwrite enabled:

$ tentacle_server -o -p 65000 -s /tmp -v
$ tentacle_client -a 192.168.1.1 -p 65000 -v /bin/bash

Simple file transfer with password authentication (not secure):

$ tentacle_server -x password -s /tmp -v
$ tentacle_client -a 192.168.1.1 -x password -v /bin/bash

Secure file transfer without client certificate:

$ tentacle_server -e cert.pem -k key.pem -w -s /tmp -v
$ tentacle_client -a 192.168.1.1 -c -v /bin/bash

Secure file transfer with client certificate:

$ tentacle_server -e cert.pem -k key.pem -f cacert.pem -w -s /tmp -v
$ tentacle_client -a 192.168.1.1 -e cert.pem -k key.pem -v /bin/bash

Secure file transfer with client certificate and password authentication:

$ tentacle_server -x password -e cert.pem -k key.pem -f cacert.pem -w -s /tmp -v
$ tentacle_client -a 192.168.1.1 -x password -e cert.pem -k key.pem -v /bin/bash

Save .xml and .log files in different subdirectories:

$ tentacle_server -v -s /tmp -i'.*\.xml:xml_dir;.*\.log:log_dir'
$ tentacle_client -a 192.168.1.1 -v xml_file.xml
$ tentacle_client -a 192.168.1.1 -v log_file.log

Connect through an HTTP proxy with authentication:

$ tentacle_server -s /tmp -v
$ tentacle_client -a 192.168.1.1 -y user:[email protected]:8080 -v /bin/bash

Bind multiple addresses (::1 of IPv6 and 192.168.1.1 of IPv4):

$ tentacle_server -a ::1,192.168.1.1 -s /tmp -v

El servidor de Tentacle permite su configuración mediante un fichero de texto plano. Todas las opciones de linea de comandos están disponibles a través de este archivo. Si se especifica una misma opción de configuración en el ficher y en línea de comandos, tendrá preferencia el valor indicado en esta última. La ruta completa al fichero de configuración se indica con la opción -F.

$ tentacle_server -F /etc/tentacle/tentacle_server.conf

1.4 Tentacle Proxy

Tentacle server can run as a proxy communicating a lot of tentacle clients to an unaccesible tentacle server.

The next diagram shows how tentacle proxy works.

+-----------------+                     +-----------------+                     +-----------------+
| Tentacle client |                     | Tentacle Proxy  |                     | Tentacle server |
+-----------------+                     +-----------------+                     +-----------------+
         |                                       |                                       |
         +-------'SEND <file> SIZE size\n'---->>>+-------'SEND <file> SIZE size\n'---->>>+
         |                                       |                                       |
         +<<<-----------'SEND OK\n'--------------+<<<-----------'SEND OK\n'--------------+
         |                                       |                                       |
         +-----------------data--------------->>>+-----------------data--------------->>>+
         |                                       |                                       |
         +-----------------data--------------->>>+-----------------data--------------->>>+
         |                                       |                                       |
         +-----------------data--------------->>>+-----------------data--------------->>>+
         |                                       |                                       |
         +<<<-----------'SEND OK\n'--------------+<<<-----------'SEND OK\n'--------------+
         |                                       |                                       |
         +---------------'QUIT\n'------------->>>+---------------'QUIT\n'------------->>>+
         |                                       |                                       |
         .                                       .                                       .

As you can see the proxy does not have any information it only forward data from the clients to the tentacle server.

To launch tentacle server in proxy mode you should type:

$ tentacle_server -b 192.168.200.200 -g 65000

These new parameters are IP address (-b) and port (-g) of unaccesible tentacle server.

Of course you can set the IP address and port for incoming data in a normal way:

$ tentacle_server -a 192.168.100.100 -p 45000 -b 192.168.200.200 -g 65000

*NOTE: Tentacle proxy now supports authentication and encryption features!!