Giter Club home page Giter Club logo

check_mk-urbackup-check's People

Contributors

edvler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

check_mk-urbackup-check's Issues

wrong url for issues

I only report that, since I'm only writting stuff here, I couldn't care less about this "bug" ;-).
When you get an error in the plugin, the message shown is:
error occured in check plugin. Please post a issue on inlcuding the output of the agent plugin /usr/lib/check_mk_agent/plugins/urbackup-check

With a link leading here. Unfortunately the link is wrong:
https://github.com/edvler/check_mk_urbackup-check/issues

after updateing to 2.0.3 can't find backups anymore

I've updated the plugin to version 2.0.3. On both check mk server and clients.
I've got two urbackups server.
With one of them everything continued working. He continues finding the file and image backups.
On the other server he reported crashes in the plugin on the server side.
So i've decided to do a "remove all and find new" in the inventory, so he would discover all the services again.
He did that, but now he can't find any of file or image backups anymore.
While on the other working server, when I did a remove all and find new, everything worked as expected.

Here is the crash report I've got, before removing everything:

IndexError (list index out of range)

File "/omd/sites/rmm/lib/python3/cmk/base/agent_based/checking/_checking.py", line 413, in get_aggregated_result
    consume_check_results(
  File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/checking_classes.py", line 494, in consume_check_results
    for subr in subresults:
  File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 93, in filtered_generator
    for element in generator(*args, **kwargs):
  File "/omd/sites/rmm/local/lib/python3/cmk/base/plugins/agent_based/urbackup_check.py", line 145, in check_urbackup
    if check_name_urbackup(line[0]) == item:
  File "/omd/sites/rmm/local/lib/python3/cmk/base/plugins/agent_based/urbackup_check.py", line 121, in check_name_urbackup
    type_bkp = arr_backups[BACKUP_TYPE]



Local Variables | {'arr_backups': ['Vita'], 'check_line': 'Vita', 'machine_name': 'Vita'}

Agent output:

<<<urbackup_check>>>
Vita Server;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_17:02+0200;;;;;True
Vita Server;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
hosting.example.com;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_00:42+0200;;;;;True
hosting.example.com;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
intranet.example.com;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_14:57+0200;;;;;True
intranet.example.com;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
work.example.com;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_23:03+0200;;;;;True
work.example.com;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
<<<<Vita Server>>>>
<<<urbackup_check>>>
Vita Server;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_17:02+0200;;;;;True
Vita Server;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
<<<<hosting.example.com>>>>
<<<urbackup_check>>>
hosting.example.com;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_00:42+0200;;;;;True
hosting.example.com;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
<<<<intranet.example.com>>>>
<<<urbackup_check>>>
intranet.example.com;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_14:57+0200;;;;;True
intranet.example.com;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False
<<<<work.example.com>>>>
<<<urbackup_check>>>
work.example.com;;;;;filebackup;;;;;filebackup;;;;;2023-08-31_23:03+0200;;;;;True
work.example.com;;;;;imagebackup;;;;;No Imagebackup configured;;;;;0;;;;;False

Crashes when monitoring server is in different timezone than urbackup server

I've reinstalled my monitoring server and accidentally put it into UTC instead of CET timezone. At the moment UTC is two hours behind CET.
When a new backup is done, it always ends in a crash of the urbackup monitoring plugin since to the plugin it seems that the backups are made in the future (Timezones are evil ;-)).

ValueError (Cannot render negative timespan)

File "/omd/sites/rmm/lib/python3/cmk/base/agent_based/checking/_checking.py", line 413, in get_aggregated_result
consume_check_results(
File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/checking_classes.py", line 494, in consume_check_results
for subr in subresults:
File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 93, in filtered_generator
for element in generator(*args, **kwargs):
File "/omd/sites/rmm/local/lib/python3/cmk/base/plugins/agent_based/urbackup_check.py", line 85, in check_urbackup
infotext = 'last ' + backup_type + ': ' + render.datetime(time.mktime(stamp)) + ' (Age: ' + render.timespan(old) + ' warn/crit at ' + render.timespan(warn) + '/' + render.timespan(crit) + ')'
File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/render.py", line 107, in timespan
ts = " ".join(_gen_timespan_chunks(float(seconds), nchunks=2))
File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/render.py", line 73, in _gen_timespan_chunks
raise ValueError("Cannot render negative timespan")

{'nchunks': 2, 'seconds': -6058.270578622818}

crash on server side when no image backup is made

When there is no image backup for a urbackup client, the check mk plugin crashes on the server side. I guess it's missing the missing timestamp:

IndexError (list index out of range)

File "/omd/sites/rmm/lib/python3/cmk/base/agent_based/checking/_checking.py", line 413, in get_aggregated_result
consume_check_results(
File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/checking_classes.py", line 494, in consume_check_results
for subr in subresults:
File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 93, in filtered_generator
for element in generator(*args, **kwargs):
File "/omd/sites/rmm/local/lib/python3/cmk/base/plugins/agent_based/urbackup_check.py", line 155, in check_urbackup
stamp = getDateFromString(machine_infos[TIMESTAMP])

{'item': 'example.com imagebackup No',
'line': ['example.com;;;;;imagebackup;;;;;No',
'Imagebackup',
'configured;;;;;0;;;;;False'],
'machine_infos': ['example.com', 'imagebackup', 'No'],
'params': Parameters({'backup_age': (93600, 108000),
'check_backup': 'check',
'modi': 'use_backup_age',
'use_performance_data': 'enable'}),`

incompatible with check-mk 2.0

I've just tried an update of check-mk. The update doesn't work properly with the installed urbackup. Also if you deinstall it, update, and reinstall it again, it doesn't work properly with check-mk 2.0
The problem is:

Invalid characters in 'urbackup-check' for SectionName: '-'

i've stopped the omd instance, renamed all files from urbackup-check to urbackup_check, and did a:

find ./ -type f -exec sed -i 's/urbackup-check/urbackup_check/g' {} ;
followed by
cmk-update-config -v
to finish the upgrade.
Now at least hceck mk works without problems. But not the urbackup plugin.
It crashes with following error

`

Exception TypeError ('NoneType' object is not subscriptable)
Traceback File "/omd/sites/rmm/lib/python3/cmk/base/checking.py", line 577, in get_aggregated_result result = _aggregate_results(check_function(**kwargs)) File "/omd/sites/rmm/lib/python3/cmk/base/checking.py", line 808, in _aggregate_results perfdata, results = _consume_and_dispatch_result_types(subresults) File "/omd/sites/rmm/lib/python3/cmk/base/checking.py", line 852, in _consume_and_dispatch_result_types for subr in subresults: File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 89, in filtered_generator for element in generator(*args, **kwargs): File "/omd/sites/rmm/lib/python3/cmk/base/api/agent_based/register/check_plugins_legacy.py", line 183, in check_result_generator for subresult in subresults: File "/omd/sites/rmm/local/share/check_mk/checks/urbackup_check", line 43, in check_urbackup machine_name = item[:-11].strip()
Local Variables {'info': [['RMMbook;;;;;2021-05-14_09:05;;;;;True;;;;;-;;;;;False']], 'item': None, 'params': {'backup_age': (93600, 108000), 'check_backup': 'check', 'modi': 'use_backup_age'}}

`

The problem seems to be "item: None".

error in check mk plugin if backup client is removed from server

If you remove a backup client from the urbackup server. The urbackup check plugin of shows an error (instead of just backup not found. or similar). It's a minimal annoyance, nothing grave ;-).
it shows:
error occured in check plugin. Please post a issue on inlcuding the output of the agent plugin /usr/lib/check_mk_agent/plugins/urbackup-check.
The plugin runs perfectly on the client (urbackup server). So I guess the error must be on the server side.
Couldn't find the aprorpiate log. sorry. but it should be easy enough to reproduce :-)

make agent appear in check_mk to be able to download it

each time I want to install the agent on a new server, I need to find it again on github, find the raw link, etc.
It would be very nice if the agent would be listed in check mk under agents. I guess it works for windows and linux, so maybe in both? or in other operating systems?
Like that I could get it easily with wget, and don't need to search for it again, and again...

Anyway, thanks for your plugin :-).

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.