justin and Claude Sonnet 4.6
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 <[email protected] >
2026-02-20 19:47:35 -05:00
justin and GitHub
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 and Claude Sonnet 4.6
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 <[email protected] >
2026-02-20 19:32:41 -05:00
justin and GitHub
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 and Claude Sonnet 4.6
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 <[email protected] >
2026-02-20 19:05:45 -05:00
justin
a0afcefc78
Create requirements.txt
2025-02-18 19:42:08 -05:00
justin and GitHub
4e24f9b1f8
Merge pull request #28 from recklessop/zvma-10-dev
...
Zvma 10 dev
2024-05-30 21:07:55 -04:00
justin and GitHub
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 and GitHub
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
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 and GitHub
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
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 and GitHub
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
justin and GitHub
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
justin and GitHub
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
justin
a20eb125c9
Update python-node-exporter.py
2023-03-23 12:17:21 -04:00
justin
502ea13a6d
Update python-node-exporter.py
...
multi-exporter logging to seperate files
2023-03-23 12:00:25 -04:00
justin
b985e8885c
gitignore and a sleep time for liveness checker
2023-03-23 11:39:44 -04:00
justin
d07b949825
remove lab metrics
2023-03-23 11:38:13 -04:00
justin
69aaaaf69b
app code update
...
added default site name and id
2023-03-23 11:37:29 -04:00
justin and GitHub
1362c0e14a
Merge pull request #14 from recklessop/vra-vm-stats
...
multi-site readiness and VRA CPU and Memory
2023-03-23 11:24:34 -04:00
justin
94a3822353
multi-site readiness and VRA CPU and Memory
...
Added Site ID and Site Name to every metric. Moved all VRA metrics to a separate thread and started collecting VRA CPU and Memory usage from vCenter API.
2023-03-23 08:01:21 -04:00
justin
fbc68dc794
Merge branch 'master' of https://github.com/recklessop/Zerto_Exporter
2023-03-22 23:27:25 -04:00
justin
0688fe6aab
exception handling and comments
2023-03-22 23:27:22 -04:00
justin and GitHub
a56c55acb2
Merge pull request #13 from recklessop/add-license-1
...
Create LICENSE
2023-03-22 23:06:13 -04:00
justin and GitHub
1fd33d5dbd
Create LICENSE
2023-03-22 23:06:04 -04:00
justin and GitHub
6528be8082
Create dependabot.yml
2023-03-22 22:59:30 -04:00
justin
79002278d7
Update python-node-exporter.py
2023-03-20 20:39:08 -04:00
justin
43dc741d52
Update python-node-exporter.py
2023-03-20 20:26:47 -04:00
justin
de3a4a83b1
Update python-node-exporter.py
2023-03-20 20:20:43 -04:00
justin
a6e42d3a73
fixing logging
2023-03-20 20:13:26 -04:00
justin
67ae2e6e09
Update python-node-exporter.py
2023-03-20 19:48:18 -04:00
justin
ebf6fd168f
Update python-node-exporter.py
2023-03-20 19:42:54 -04:00
justin
7c0ffd1458
Update python-node-exporter.py
2023-03-20 19:40:05 -04:00
justin
78943bf5f6
fixed version dunder
2023-03-20 19:37:41 -04:00
justin
84fa3d207d
Added versioning
2023-03-20 19:21:45 -04:00
justin
00e60c31fe
Update python-node-exporter.py
2023-03-20 19:14:52 -04:00
justin
674e16b956
Update python-node-exporter.py
2023-03-20 19:00:16 -04:00
justin
a23b0cf701
Update python-node-exporter.py
2023-03-20 18:44:53 -04:00
justin
2897ae0fa9
Update python-node-exporter.py
2023-03-08 23:33:19 -05:00
justin
abed5d9620
Update python-node-exporter.py
...
use absolute values on some metric calculations so prevent negative values in the rare case a ZVM is rebooted.
2023-03-08 23:22:55 -05:00
justin
9866be8dba
Update python-node-exporter.py
2023-03-08 18:40:41 -05:00
justin
6b7510b1ce
Update python-node-exporter.py
2023-03-08 18:35:12 -05:00
justin
50dcb7a061
Update python-node-exporter.py
2023-03-08 18:32:49 -05:00
justin
c634b4640a
Update python-node-exporter.py
2023-03-08 09:35:23 -05:00
justin
2cee6a689d
Update python-node-exporter.py
2023-03-08 09:29:43 -05:00
justin
35f6908849
Update python-node-exporter.py
2023-03-08 09:16:09 -05:00
justin
00c5529fd5
Update python-node-exporter.py
...
added log file rotation
2023-03-08 09:13:25 -05:00
justin
9cab34f2e5
Update python-node-exporter.py
2023-03-08 09:05:37 -05:00
justin
e952e9912b
Update python-node-exporter.py
2023-03-08 09:01:55 -05:00
justin
4fe8e61637
Update python-node-exporter.py
2023-03-08 08:51:40 -05:00
justin
3e70631471
Update python-node-exporter.py
...
Testing ChatGPT generated optimizations which will make sure that the various stats gathering threads will be restarted if they crash
2023-03-08 08:45:08 -05:00
justin
b7dbebf2ee
Merge branch 'master' of https://github.com/recklessop/Zerto_Exporter
2023-03-07 19:27:58 -05:00
justin
c8d365bace
Update python-node-exporter.py
2023-03-07 19:27:52 -05:00
justin and GitHub
f528dcff44
Update README.md
2023-03-06 07:07:51 -05:00
justin and GitHub
9f809a5321
Update README.md
2023-03-06 07:05:29 -05:00
justin and GitHub
a40561460c
Update README.md
2023-03-06 07:05:10 -05:00
justin and GitHub
40883a784c
Merge pull request #11 from recklessop/snyk-fix-ce38e95cf356e99e33f935c36603d0dc
...
[Snyk] Security upgrade python from 3.11.0a7-slim to 3.12.0a5-slim
2023-03-05 08:02:23 -05:00
justin
c323bedc41
Update python-node-exporter.py
...
added journal volume size and number of VMDKs per VM
2023-03-02 13:12:37 -05:00
justin
dbc4df9168
Create .gitignore
2023-03-02 13:04:00 -05:00
justin
1b857d3b55
Update python-node-exporter.py
2023-02-27 19:22:22 -05:00
justin
05ad327ee3
Update python-node-exporter.py
2023-02-27 19:05:31 -05:00
justin
c432f81451
Update python-node-exporter.py
...
Added env variable to control how often the scraper runs against the ZVM API, default is now 30 seconds instead of 10
2023-02-27 18:21:59 -05:00
justin
843570c39e
Update python-node-exporter.py
2023-01-29 13:31:00 -05:00
justin
f1fe7986c4
Update python-node-exporter.py
...
moves stats api to a dedicated functions, slowed down other api gets to 1 minute
2023-01-29 13:16:38 -05:00
justin
8820f3416e
Update python-node-exporter.py
...
removed hostname metric as it is txt
2023-01-29 12:39:11 -05:00
justin
701d940903
More Metrics
...
Added VRA metrics and updated VPG metrics
2023-01-29 12:23:52 -05:00
justin
bb7ccc487f
Update python-node-exporter.py
2023-01-29 11:35:02 -05:00
justin
612f7b1d6b
fixed regression in vm stats
2023-01-29 11:29:25 -05:00
justin
b2e04a9e0f
Update python-node-exporter.py
2023-01-28 22:32:40 -05:00
justin
42389c9b88
Update python-node-exporter.py
2023-01-28 22:09:01 -05:00
justin
287683866b
Update python-node-exporter.py
2023-01-28 22:00:33 -05:00
justin
bed5a76556
Update python-node-exporter.py
2023-01-28 21:57:19 -05:00
justin
0d4d355ba6
Update python-node-exporter.py
2023-01-28 21:45:23 -05:00
justin
9cfda1c6b0
Update python-node-exporter.py
2023-01-28 21:35:57 -05:00
justin
c50490c270
Update python-node-exporter.py
...
Fixed Appliances metric name
2023-01-28 21:08:06 -05:00