Misc. simple utilities to aid version control and host maintenance.

ossobv, updated 🕥 2023-03-22 10:01:06

vcutil

Misc. simple utilities to aid version control and host maintenance.

Many tools are intended to be used in other shell scripts. Startup speed is of the essence, so you'll find very little Python here.

Issues

zabdig fails when store is locked

opened on 2022-09-30 09:48:26 by osso-rkuper

problem: Traceback (most recent call last): File "/usr/bin/zabdig", line 656, in <module> main() File "/usr/bin/zabdig", line 595, in main (user, password) = get_from_secret_storage(args.section) File "/usr/bin/zabdig", line 528, in get_from_secret_storage res[0].ensure_not_locked() File "/home/robin/.virtualenvs/kubernetes-ansible/lib/python3.10/site-packages/secretstorage/item.py", line 49, in ensure_not_locked raise LockedException('Item is locked!') secretstorage.exceptions.LockedException: Item is locked! fix: patch --- /usr/bin/zabdig 2022-09-15 11:17:37.000000000 +0200 +++ zabdig 2022-09-30 11:47:12.660298476 +0200 @@ -507,6 +507,8 @@ def get_from_secret_storage(section): attrs = {'application': 'zabdig'} if section: attrs['section'] = section + if coll.is_locked(): + coll.unlock() res = [i for i in coll.search_items(attrs)] # FIXME: add 'or True' to overwrite previous passwords if not res: # or True:

gelf-payload-decode tcpdump-x parser bad?

opened on 2022-09-27 12:18:18 by wdoekes

Does this read the end of packets correctly? Or should that be {2,39}?

https://github.com/ossobv/vcutil/blob/main/gelf-payload-decode#L153-L164

zabdig: list webscenarios and executed steps

opened on 2020-07-29 12:52:59 by vilitux

If zabdig would be able to show webscenarios those could be exported into different tools to keep it in sync (e.g. prometheus blackbox exporter).

Ideas for output could be something like this: output for all scenarios for a specific host: $ zabdig host-with-webscenario webscenario host-with-webscenario my-basic-webcheck my-second-basic-webcheck my-advanced-webcheck

output for all scenarios for a specific webcheck on that host: $ zabdig host-with-webscenario webscenario my-basic-webcheck my-basic-webcheck 1. https://basic-webcheck.com 2. https://basic-webcheck.com/login 3. https://basic-webcheck.com/status

interfaces2netplan: cmd 'bond-mode' unknown/unimplemented

opened on 2019-03-25 09:54:50 by vilitux

We have the following configuration active in /etc/network/interfaces: auto bond0 iface bond0 inet static address 192.168.1.25 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 8.8.4.4 bond-mode active-backup bond-miimon 100 bond-slaves eno1 eno2 When using interfaces2netplan, it gives us the following stacktrace:

Traceback (most recent call last): File "/usr/bin/interfaces2netplan", line 399, in <module> main() File "/usr/bin/interfaces2netplan", line 394, in main files.show() File "/usr/bin/interfaces2netplan", line 183, in show yaml = self.get_yaml() File "/usr/bin/interfaces2netplan", line 162, in get_yaml ifile = InterfacesParser(interfaces_lines) File "/usr/bin/interfaces2netplan", line 203, in __init__ self._parse() File "/usr/bin/interfaces2netplan", line 255, in _parse str(i) for i in e.args))) ValueError: /etc/network/interfaces:24: parse fail at ' bond-mode active-backup': cmd 'bond-mode' unknown/unimplemented

The expected output would've been something like this: network: version: 2 renderer: networkd bonds: bond0: interfaces: - eno1 - eno2 addresses: - 192.168.1.25/24 gateway4: 192.168.1.1 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 parameters: mode: active-backup mii-monitor-interval: 100

or

network: version: 2 renderer: networkd bonds: bond0: interfaces: [eno1, eno2] addresses: [192.168.1.25/24] gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8, 8.8.4.4] parameters: mode: active-backup mii-monitor-interval: 100

zabdig: list webchecks and if they have a trigger

opened on 2017-09-09 19:23:48 by hbos

to easily spot if there are any webchecks who miss a trigger.

zabdig: check if zabbix events are up to date

opened on 2017-06-09 13:00:52 by hbos

Its not super important actually but if there is a lot of action and/or your working with a slow zabbix this can be an indicator your looking at old data. Maybe its enough show a warning.

We could show if there are many items queued (Administration->Queue in zabbix web. There is an "Overview" and "Overview proxies" which might be relevant)

Or maybe just check some items from zabbix templates.

e.g there is a graph showing "zabbix internal process busy". Maybe just breaking down those values in a list is good enough. If its very busy you can expect some queueing.

cli utilities