Sign inSign up

flythingscrew/flymonitor

By flythingscrew

•Updated over 2 years ago

Machine monitoring service, integrated with FlyThings to be able to know the status of your machine.

Image
0

1.9K

flythingscrew/flymonitor repository overview

⁠FlyMonitor

FlyMonitor is a machine monitoring service, integrated with FlyThings to be able to know the status of your machine in real time.

⁠Docker deploy as container
$> docker stop flymonitor && docker rm flymonitor
  • Deploy container
$> docker run -d --name flymonitor -it --privileged --restart=always -p 8001:8000 \
    -v /proc/:/host/proc/:ro \
    -v <config-file-path>:/etc/flythings/flymonitor.yml \
    flythingscrew/flymonitor:latest
  • Check logs that all its fine
$> docker logs flymonitor -f --tail 20
⁠Docker deploy as a service
version: '3.7'
services:
  flymonitor:
    image: flythingscrew/flymonitor:latest
    ports:
      - 8001:8000
    volumes:
      - <config-file-path>:/etc/flythings/flymonitor.yml
      - /proc/:/host/proc/:ro
    privileged: true
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
  • Deploy service as a stack
$> docker stack deploy --compose-file=<path-to-service-yml> flymonitor 

⁠Verification

To check the correct installation of monitoring, we are going to execute the next command:

$ curl http://localhost:8001

⁠Uninstall

⁠Docker
$ docker stop flymonitor && docker rm flymonitor

⁠Config File

⁠Format file
server: firefly.itg.es:8090   ## [Mandatory] Server Name where insert data
hostname: Test                ## [Mandatory] Device name
auth:                         ## [Mandatory] Auth fields (only with of kind methods)
  token: <token>              ## Authorization token with observations, devices, actions and series scopes (if this field exists is not necessary user and password)
  user: <user>                ## User where insert data
  password: <password>        ## Device password where insert data
procedure: Default            ## [Optional] Default procedure to system properties (Default: Default)
is_docker: False              ## [Optional] Enable if is deployed inside a docker container (Default: False)
interval_cron: 60             ## [Optional] Cron interval In seconds (Default: 60 secods)
interval_realtime: 10         ## [Optional] Realtime interval In seconds (Default: 10 seconds)
processes:                    ## [Optional] List of processes to monitor (Default: None)
  - chrome
  - spotify
  - influxdb
  - virtualbox
enabled_realtime: False       ## [Optional] Default status of realtime when startup the monitoring (Default: False)
actions:                      ## [Optional] List of custom actions to register in FlyThings (Default: None)
  - name: ls
    command: dir
  - name: ping2
    command: echo "All working fine"
  - name: status
    command: vagrant global-status

⁠Licencia

MIT

Free Software, Ouh yeah!

Tag summary

Content type

Image

Digest

sha256:23ec85170…

Size

195.3 MB

Last updated

over 2 years ago

docker pull flythingscrew/flymonitor