Zabbix Share

Zabbix templates, modules & more
Log in
Choose social to login:
Login With Google
Login With Github

Nav view search

Navigation

Advanced Search
  • Applications
    • 1C
    • Anti-Virus
    • Backup
    • Bug and issue tracking
    • Cluster
    • Clustered File Systems
    • DNS
    • Excel Export
    • Firewall
    • HelpDesk System
    • High Availability (HA)
    • Java Application
    • Mail servers
    • Misc
    • Monitoring System
    • NFS
    • NTP
    • Others
    • Pi-Hole
    • Process Managers
    • Queue managers
    • Security
    • SIEM
    • Skype
    • Ticketing System
    • Time synchronization
    • TV Broadcasting
    • Web-servers
  • Cloud
  • Databases
  • Network Appliances
  • Network Devices
  • Official Templates
  • Operating Systems
  • Power (UPS)
  • Printers
  • SCADA, IoT, Energy, Home Automation, Industrial monitoring
  • Server Hardware
  • Storage Devices
  • Telephony
  • Unsorted
  • Virtualization
  • Zabbix
  • Recently Added
  • Recently Updated
  • Popular
  • Most Rated
  • Top Rated
  • Most Reviewed

zabbix-syncthing

  • 580.jpg

About

It was about Christmas and I started to feel a little nerdy. So inside of me a wish was growing up: I wanted to have an overview over all the backup- and sync-processes I run during the day. So I installed Zabbix and started to play around with its extensions. This is a Bash-script consuming (one says so, right?) the RestAPI of Syncthing. When installed in your Zabbix-scripts-directory and after deploying the Template you may see the following data per Syncthing-folder:

  • device-last-seen (string): when was the remote device seen for the last time?
  • last-folder-scan-time (string): when happened the last local scan of the folder?
  • last-sync-time (string): when was a file synced for the last time?
  • last-synced-file (string): guess what?!? ;-)

Furthermore a quite expensive /rest/db/status-call is done to catch values like:

  • globalBytes, inSyncBytes, needBytes: amount of bytes in total, in sync and to by synced
  • globalFiles, inSyncFiles, needFiles: amount of files in total, in sync and to be synced
  • errors, pullErrors: amount of files that failed

Install and Configure

  1. download syncthing.sh and install it to you ExternalScripts-directory (zabbix_server.conf -> ExternalScripts)
  2. make it executable: chmod a+x syncthing.sh
  3. carefully read the output of ./syncthing.sh --help - I hate to document and I did it just for you! ;-)

To access Syncthing you need an API-Key. You get it by looking in Syncthing's WebApp at Actions -> Advanced. By default the Syncthing-Server can be defined via commandline (--ip, --port, --apikey -> the template is intended to use this too). But there might be situations in which you don't want to have your API-Key stored on Zabbix. In these cases you may add one or many Syncthing-hosts by:

  • opening syncthing.sh
  • searching for the line ## Adding static syncthing-hosts
  • adding your host: add_syncthing_host "INTERNALHOSTNAME" "IP" "PORT" "API Key" You may address such an host by using the --host=INTERNALHOSTNAME-parameter.

Now download the template (template_syncthing.xml) and add it to your Zabbix via Configuration -> Templates -> Import. In the template directly go to the Macros-menu (well hidden as sub-tab in the first tab) and either add your Syncthing-Server-details or create a new --host-macro and edit all the items to use it.

 

Rating
500
0 vote

Listing Details

Type
Zabbix Tool
Min Zabbix version
3.0.x
Features
  • Zabbix Trapper
  • Custom Script
  • Other
Link
github.com/aroesler-privat/zabbix-syncthing/
Created
2019-01-01
Modified
2019-01-02 07:55:28
Owner
Andreas
RecommendReportOwner's listing
All resources created by third parties; use at your own risk
© 2001-2018 by Zabbix SIA. All rights reserved. Trademark Policy · Contact us