= Data collector!
  
image::ROOT:swarmlab.png[swarmlab,150,float=right]

The "data collector" is a lightweight microservice application that collect and sends metadata, collected from a system, such as an IoT network, distributed system, data center, etc to a storage system.


* The data are transmitted, stored, and can be retrieved at any time.

*"data collector"* are developed with a platform agnostic"container-based application strategy

[NOTE]
====

A platform-agnostic approach offers many choices

* Can be seamlessly moved from local development machine to production deployments

* Flexibility, Reliability

** Avoiding Vendor Lock-In

* From Code to full-blown systems

** from a single container on your local machine

** to a running cloud native - container-based environment
====



== Start 

You can start it in the same way as you start any other application.

TIP: You can find more information http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/hybrid/start-microservices.html[here^]


NOTE: You may have to *wait* (couple of minutes) for the system to fully provision resources. You may have to *refresh* the web interface a couple of times!

=== on Error:

[NOTE]
====

*on Error:*

[source,bash]
----
UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
----
Run:

[source,bash]
----
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120 
----

*onError:*

[source,bash]
----
could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
----

*Do you have a VPN connected?*

* Turn off VPN

* Start POC

* After that, you can enable VPN again



====







== Open web interface

Find "webclient" Instance from menou: 

* *Instances* - > click *more*

* *connect* -> "Click here to open the Web_App"

== Open console

Find "webclient" Instance and *run*

[source,c]
----
docker exec ... Command
----


== Source directory

The directory that contains the source is in "Directory Maps -> Local" column.


image::ROOT:swarmlab-connect.png[float=right]


* (1)  Opens the info  menu 
* (2)  Run a shell in a running container
* (3)  Opens web interface
* (4),(5)  Source directory -  Directory Maps

*"Directory Maps"* are the preferred mechanism for persisting data generated and used by Docker containers. We use here "bind mounts" and they are dependent on the directory structure and OS of the host machine.



WARNING: Your local changes to the files will be overwritten by clicking the "Download" button. You should always *take a full backup* first (simple copy the directory tree)



