justin
931d6cdf3e
Merge pull request #71 from recklessop/feat/source-recovery-vra-labels
...
Add VmSourceVRA label and resolve VRA names for VM metrics (v3.1.0)
2026-02-21 11:41:01 -05:00
justin
7a45a9c49a
Add VmSourceVRA label and resolve VRA names for VM metrics
...
- Add VmSourceVRA to _VM_LABELS, populated from vm['OwningHostName']
resolved to a VRA name via a host→VRA lookup built from zvm.vras()
- VmRecoveryVRA now also resolves to the actual VRA name (e.g.
Z-VRA-192.168.50.21) instead of the raw ESXi host IP
- Cloud-target VPGs (Azure/AWS) correctly emit VmRecoveryVRA="" since
there is no local VRA on the recovery side
- Bump version to 3.1.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-21 11:39:35 -05:00
justin
d058b9fcbd
Add semantic version tag to Docker Hub pipeline
...
Extract VERSION from app/version.py and push it as an additional image
tag alongside the build ID and latest, so users can pin to a specific
release (e.g. recklessop/zerto-exporter:3.0.0).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-20 20:08:45 -05:00
justin
f408334039
Merge pull request #70 from recklessop/fix/duplicate-vra-metrics-on-upgrade
...
Fix duplicate VRA metrics after VRA upgrade
2026-02-20 20:06:30 -05:00
justin
4252d3c187
Fix duplicate VRA metrics after VRA upgrade ( closes #21 )
...
VraVersion is used as a Prometheus label. When a VRA upgrades, the new
version creates a new time series while the old one persists until restart.
Fix: clear all VRA Gauges at the start of each collection cycle so stale
label sets (old version numbers) are removed before repopulating with
current data.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-20 20:04:00 -05:00
justin
f360c34b3d
Merge pull request #69 from recklessop/fix/counter-reset-on-zvm-reboot
...
Fix: suppress counter spike/negative value on ZVM reboot
2026-02-20 19:56:23 -05:00
justin
1f591e20ef
Bump version to 3.0.0 and remove leaked PyPI token
...
- Version bumped to 3.0.0 to reflect breaking changes: dropped zvma9_7,
switched to prometheus_client + JSON stdout logging, removed legacy packages
- Remove app/.pypirc (contained leaked PyPI token, now gitignored)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-20 19:55:19 -05:00
justin
a4ff29e1b5
Fix counter spike/negative on ZVM reboot ( closes #12 )
...
When a ZVM reboots its cumulative counters (IOPs, write/sync/network MBs,
encrypted/unencrypted LBs) reset to zero. The previous abs() approach
converted the large negative delta into an equally wrong positive spike.
Introduces _counter_delta(new, old, vm_id, metric) which:
- Returns new - old when new >= old (normal incrementing counter)
- Returns new as-is when new < old (counter reset / reboot detected)
and logs a WARNING identifying the VM and metric that reset
Publishing the raw new value on reset correctly reflects the restarted
counter state, suppresses the false spike, and produces a visible dip
in Grafana that naturally indicates the ZVM reboot event.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-20 19:47:35 -05:00
justin
5a659c789f
Merge pull request #68 from recklessop/security/cve-fixes-and-python314
...
Security: Python 3.14.3-slim, fix 9 CVEs, remove leaked PyPI token
2026-02-20 19:37:55 -05:00
justin
1992fb1d17
Bump to Python 3.14.3-slim, fix 9 CVEs, remove leaked PyPI token
...
- Dockerfile: python:3.13-slim -> python:3.14.3-slim (stable as of Feb 2026)
- certifi: 2023.7.22 -> >=2024.7.4 (CVE-2024-39689, LOW)
- idna: 3.4 -> >=3.7 (CVE-2024-3651, MEDIUM)
- requests: 2.32.0 -> >=2.32.4 (CVE-2024-47081, MEDIUM)
- urllib3: 2.0.6 -> >=2.6.3 (6 CVEs including 3 HIGH decompression/redirect)
- Add app/.pypirc and .pypirc to .gitignore to prevent future token leaks
NOTE: PyPI token was previously committed at 21f32e5 - rotate at pypi.org.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-20 19:32:41 -05:00
justin
cc30b7de00
Merge pull request #67 from recklessop/cleanup/prometheus-client-json-logging
...
Refactor: prometheus_client, JSON logging, Python 3.13, codebase cleanup
2026-02-20 19:07:29 -05:00
justin
2836e1ae10
Refactor to prometheus_client, JSON logging, and codebase cleanup
...
- Replace file-based metrics and HTTP server with prometheus_client
(Gauge + start_http_server), eliminating file I/O race conditions
- Fix ThreadProbe and thread restart lambda bugs
- Switch logging from RotatingFileHandler to JSON stdout for fluentd/Loki
- Add PYTHONUNBUFFERED=1 to Dockerfile for immediate container log output
- Upgrade base image from python:3.12.3-slim to python:3.13-slim
- Upgrade pyvmomi to 9.0.0.0; pin pydantic>=2.9.0 and typing_extensions>=4.12.2
to use pre-built Python 3.13 wheels (removes Rust toolchain from build)
- Remove unused packages: boto3, botocore, s3transfer, jmespath, redis,
docopt, pyflakes, posthog
- Remove unused imports (Posthog, CaseInsensitiveDict) and dead variables
(callhomestats, local_site_info, lastStats)
- Fix service_profile() NameError (siteidentifier -> serviceProfileIdentifier)
- Remove bare print() in zvma.py __authhandler__, replace with self.log.info()
- Remove all commented-out PostHog blocks from zvma10/zvma.py
- Delete legacy zvma9_7/ module and app/logs/ directory
- Remove deprecated 'version: 3.3' from docker-compose.yml
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-20 19:05:45 -05:00
justin
a0afcefc78
Create requirements.txt
2025-02-18 19:42:08 -05:00
justin
4e24f9b1f8
Merge pull request #28 from recklessop/zvma-10-dev
...
Zvma 10 dev
2024-05-30 21:07:55 -04:00
justin
ee10bb9a6b
Merge branch 'master' into zvma-10-dev
2024-05-30 21:07:21 -04:00
justin
a0ac6883f4
updates for zvma10
2024-05-30 20:57:39 -04:00
justin
cdb9849dac
Merge pull request #27 from recklessop/snyk-fix-28edd64afa8addd160b5c07dc78845c4
...
[Snyk] Security upgrade python from 3.13.0a2-slim to 3.13.0b1-slim
2024-05-28 20:00:51 -04:00
snyk-bot
8a48f1bbcf
fix: Dockerfile to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-6210088
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-6210088
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-6210098
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-6210098
- https://snyk.io/vuln/SNYK-DEBIAN12-GNUTLS28-6159410
2024-05-10 01:22:10 +00:00
justin
4e95d13c6d
Update python-node-exporter.py
2023-12-21 14:00:10 -05:00
justin
21f32e5a31
updates for docker environments
2023-12-21 12:57:30 -05:00
justin
57a18385f3
Update docker-compose.yml
2023-12-21 11:23:53 -05:00
justin
a581cdfb6d
Update requirements.txt
2023-12-21 10:48:29 -05:00
justin
7618fa7d04
finished exporter refactor
...
Ready for some beta testing with Zerto 10.0
2023-12-21 10:34:41 -05:00
justin
deae17aca9
updates to modules
2023-12-19 12:18:46 -05:00
justin
0911a4eccc
zvma10 wrapper module
...
Created a python module that has everything needed for comms with ZVMA version 10 in a seperate class. It does not have full api coverage, but is enough to start refactoring the exporter to use the class for ZVMa10
2023-12-08 11:05:50 -05:00
justin
213a0a2459
Merge pull request #22 from recklessop/snyk-fix-f7523e4220b1555e8cf7adedf646ab42
...
[Snyk] Security upgrade python from 3.12-slim to 3.13.0a2-slim
2023-12-06 08:12:56 -05:00
snyk-bot
5385aad899
fix: Dockerfile to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-GNUTLS28-6062100
- https://snyk.io/vuln/SNYK-DEBIAN12-PERL-5489190
- https://snyk.io/vuln/SNYK-DEBIAN12-PERL-6085273
- https://snyk.io/vuln/SNYK-DEBIAN12-SHADOW-1559391
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
2023-12-06 13:10:29 +00:00
justin
b51a7bd068
added zvma class to module
2023-10-26 19:35:29 -04:00
justin
4781b942f4
started zvm site class from vcenter template
2023-10-24 20:57:41 -04:00
justin
c6ee202b6d
updated gitignore
2023-10-24 20:42:47 -04:00
justin
48dc444166
dev updates
...
Not finished, but pushing for use on another machine
2023-10-24 19:52:09 -04:00
justin
42c023d840
Update .gitignore
2023-10-14 11:54:05 -04:00
justin
58839310a1
Merge pull request #20 from recklessop/snyk-fix-5b6458b61e94428d973e649b3ee15331
...
[Snyk] Security upgrade python from 3.12.0rc2-slim to 3.12-slim
2023-10-14 08:43:30 -04:00
snyk-bot
3892678659
fix: Dockerfile to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5894114
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5927132
- https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5927132
- https://snyk.io/vuln/SNYK-DEBIAN12-KRB5-5825659
- https://snyk.io/vuln/SNYK-DEBIAN12-KRB5-5825659
2023-10-13 10:01:43 +00:00
justin
1a0fc567d8
Merge pull request #19 from recklessop/snyk-fix-71a80b238b5989d10aaf4fb1e834b77a
...
[Snyk] Security upgrade python from 3.12.0a5-slim to 3.12.0rc2-slim
2023-10-05 13:44:07 -04:00
snyk-bot
c1532af54d
fix: Dockerfile to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN11-NCURSES-2767191
- https://snyk.io/vuln/SNYK-DEBIAN11-NCURSES-2767191
- https://snyk.io/vuln/SNYK-DEBIAN11-NCURSES-2767191
- https://snyk.io/vuln/SNYK-DEBIAN11-NCURSES-2767191
- https://snyk.io/vuln/SNYK-DEBIAN11-OPENSSL-3368735
2023-09-20 21:25:42 +00:00
justin
43f313ec9d
Update LICENSE
2023-04-01 14:57:38 -04:00
justin
251b23990c
Update python-node-exporter.py
...
Updated logic to look for VM and VPG ID in encryption detection stats incase VM is protected using one to many
2023-03-25 13:23:15 -04:00
justin
65ab4d33d6
Update python-node-exporter.py
2023-03-25 00:14:13 -04:00
justin
a265a84517
Update python-node-exporter.py
...
fix for one to many protection of vms
2023-03-25 00:02:03 -04:00
justin
bb4b538bb5
Update python-node-exporter.py
2023-03-24 23:38:59 -04:00
justin
1cc51f6434
updated vm metric tags
...
added vpgname to vm stats
2023-03-24 23:00:02 -04:00
justin
39d8ac07ae
Update python-node-exporter.py
...
removing data from the VM api for VMs recovering to a site
2023-03-24 22:36:12 -04:00
justin
af393322de
threads logger update
...
updated threads file so that it shows which exporter it is actually monitoring incase there is many
2023-03-23 13:26:47 -04:00
justin
c8f145b27b
updated log file path
...
moved logs into a path where they can easily be seen over http instead of logging into the docker host
2023-03-23 13:19:03 -04:00
justin
cf05ae8e34
Update python-node-exporter.py
...
Had to account for public cloud recoveryhosts returning None. Will open an issue to solve this better later
2023-03-23 13:16:12 -04:00
justin
59df05c079
make vcenter optional
...
If vcenter hostname isnt set dont try to get vra cpu and memory
2023-03-23 12:45:43 -04:00
justin
4a6588cc82
Update python-node-exporter.py
...
ill get it right sooner or later
2023-03-23 12:39:00 -04:00
justin
7f80cdf3cb
Update python-node-exporter.py
...
im stupid :)
2023-03-23 12:35:21 -04:00
justin
6420a1d0ec
Update python-node-exporter.py
...
added exception handling to data collection function
2023-03-23 12:31:11 -04:00