Code Monkey home page Code Monkey logo

zabbix_backuppc's Introduction

Template App BackupPC by Zabbix agent

Overview

For Zabbix version: 5.0 and higher also requires BackupPC 4.4.1 and higher. The template to monitor BackupPC by Zabbix that work without any external scripts. The metrics are collected in one pass remotely using web.page.get and HTTP/HTTPS Values are recevied from metrics API ?action=metrics

Last backup and some metrics are detected using javascript.

This template was tested on:

  • Zabbix, version 5.0
  • BackupPC, version 4.4.1>

Zabbix configuration

No specific Zabbix configuration is required.

Macros used

Please read the descriptions in the template.

Screenshots

BackupPC Zabbix1

BackupPC Zabbix2

BackupPC Grafana1

BackupPC Grafana2

BackupPC Grafana3

zabbix_backuppc's People

Contributors

dkadioglu avatar ma11011s avatar yurtesen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

zabbix_backuppc's Issues

Hi im getting an error with the Preprocessing Parameters: {(?:[^{}]*|(?R))*}

Preprocessing failed for: HTTP/1.1 200 OK..Connection: close..Transfer-Encoding: chunked..Content-Type: text/html; charset=...

  1. Failed: cannot perform regular expression "{(?:[^{}]|(?R))}" match for value of type "none": pattern does not match

and when i test the preprocessing steps i get:
cannot perform regular expression "{(?:[^{}]|(?R))}" match for value of type "none": pattern does not match

im on zabbix 6.4.5

problem

I dont know what goes wrong but if i runt a test in zabbix i get all this information and it looks like it takes 70f before the json and the data gets wrong. You know where the 70f is coming from? i dont see that if i just use a browser.

HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Content-Type: application/json
Date: Sun, 10 Oct 2021 23:33:01 GMT
Server: Apache/2.4.46 (FreeBSD)

70f
{"pool":null,"queues":{"command_count":0,"user_count":0,"background_count":1},"server":{"config_time":1618496699,"next_wakeup_time":1633910400,"pid":7564,"start_time":1615933007,"version":"4.4.0","hostname":"backuppc05"},"cpool":{"dir_count":16512,"repeated_file_count":0,"remove_size":1383847,"size":819276309,"file_count":4794226,"time":0,"remove_file_count":93764,"repeated_file_max":0},"disk":{"inode_usage":6,"usage":6},"hosts":{"fs22":{"full_period":"6.97","disabled":0,"full_duration":119473,"error":null,"full_size":957608574684,"state":"Status_backup_in_progress","full_rate":8015271,"incr_duration":1943,"incr_period":"0.97","incr_age":1633752001,"incr_keep_count":6,"full_count":1,"reason":"","incr_count":7,"full_keep_count":[1],"full_age":1633197600},"fs33":{"incr_count":7,"full_keep_count":[1],"full_age":1633766947,"incr_age":1633853154,"incr_keep_count":6,"full_count":1,"reason":"Reason_nothing_to_do","full_rate":8638343,"incr_duration":832,"incr_period":"0.97","full_period":"6.97","disabled":0,"full_duration":84974,"error":null,"full_size":734034584047,"state":"Status_idle"},"winfs01":{"reason":"Reason_nothing_to_do","incr_keep_count":6,"full_count":1,"incr_age":1633892401,"full_age":1633633201,"incr_count":7,"full_keep_count":[1],"state":"Status_idle","error":null,"full_size":191659281222,"full_duration":18811,"disabled":0,"full_period":"6.97","incr_period":"0.97","full_rate":10188681,"incr_duration":268},"winapp02":{"state":"Status_idle","error":null,"full_size":3219,"full_duration":1,"full_period":"6.97","disabled":0,"incr_period":"0.97","full_rate":3219,"incr_duration":0,"reason":"Reason_nothing_to_do","incr_keep_count":6,"full_count":1,"incr_age":1633892401,"full_age":1633374000,"incr_count":7,"full_keep_count":[1]}}}
0

BackupPC 4.4.1 ?

Hello, where you get BackupPC 4.4.1 ? Latest is 4.4.0 for years.

Triggers "No new backups for..." don't work due to wrong calculation

The triggers No new backups for {$BACKUPPC.OLDBACKUP.CRIT:"hostname"} and No new backups for {$BACKUPPC.OLDBACKUP.WARN:"hostname"} don't work due to a miscalculation in

if (hostArray['full_age'] > hostArray['incr_age']) {

The metrics in a patched BackupPC (backuppc/backuppc#391) contain full_start_time and incr_start_time and not, as is used for above calculation, full_age and incr_age. This leads to the situation, that no backups for x days are wrongly alarmed.

The fix is easy: replace full_age and incr_age with full_start_time and incr_start_time in

if (hostArray['full_age'] > hostArray['incr_age']) {
.

zabbix server upgrade breaks <hostname>.error reading

I don't know if this is a real bug but i'd like to share this.

I have a well functioning zabbix 6.x (installed with packages) on a debian 11.
This zabbix monitors (also) a backuppc host with tens of backupped hosts.
I upgraded (via apt) the zabbix server (zabbix-agent, zabbix-frontend-php, zabbix-nginx-conf, zabbix-release, zabbix-server-pgsql, zabbix-sql-scripts) from version 1:6.0.5-1+debian11 up to version 1:6.0.13-1+debian11.
All the Error triggers for every host backupped by the backuppc host activated! (and still are...)

All the other readings are ok... only the error status (for every host) changed:
image
The server has been upgraded at 17:45. The triggers activated at 18:19.

Please note that i did not touched the backuppc host so far.
I tried, later, to upgrade also the agent2 on backuppc, to avoid a (server-agent) version mismatch. The upgrade went well, but no change.

I checked the json returned to the /index.cgi?action=metrics call on the backuppc system, dumping http traffic on localhost.
Every host actually contains ... ,"error":null, ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.