Compare commits

..

No commits in common. "bd955e806794a70b0fe86ec0f6806bad876472eb" and "b57db23a3586b6db8955c0a6b7c0800e34ef55c5" have entirely different histories.

4 changed files with 9 additions and 11 deletions

12
flake.lock generated
View File

@ -3,11 +3,11 @@
"debBundler": { "debBundler": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1746317543, "lastModified": 1725149456,
"narHash": "sha256-1Xph5g1Lazzkc9XuY1nOkG5Fn7+lmSdldAC91boDawY=", "narHash": "sha256-rRrSD7itoPm+VIT4bIzSupQ7jw+H4eOjxRiRA89Kxb4=",
"owner": "illustris", "owner": "illustris",
"repo": "flake", "repo": "flake",
"rev": "e86bd104d76d22b2ba36fede405e7bff290ef489", "rev": "257a6c986cb9a67c4d6d0e0363507cab7f958b63",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,11 +18,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1746663147, "lastModified": 1725103162,
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -14,7 +14,7 @@ rec {
packages.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux; rec { packages.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux; rec {
pvemon = python3Packages.buildPythonApplication { pvemon = python3Packages.buildPythonApplication {
pname = "pvemon"; pname = "pvemon";
version = "1.3.3"; version = "1.3.2";
src = ./src; src = ./src;
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
pexpect pexpect

View File

@ -34,7 +34,6 @@ pool_cache = {
DEFAULT_PORT = 9116 DEFAULT_PORT = 9116
DEFAULT_INTERVAL = 10 DEFAULT_INTERVAL = 10
DEFAULT_PREFIX = "pve" DEFAULT_PREFIX = "pve"
DEFAULT_HOST = "0.0.0.0"
gauge_settings = [ gauge_settings = [
('kvm_cpu', 'CPU time for VM', ['id', 'mode']), ('kvm_cpu', 'CPU time for VM', ['id', 'mode']),
@ -354,7 +353,6 @@ class PVECollector(object):
def main(): def main():
parser = argparse.ArgumentParser(description='PVE metrics exporter for Prometheus') parser = argparse.ArgumentParser(description='PVE metrics exporter for Prometheus')
parser.add_argument('--port', type=int, default=DEFAULT_PORT, help='Port for the exporter to listen on') parser.add_argument('--port', type=int, default=DEFAULT_PORT, help='Port for the exporter to listen on')
parser.add_argument('--host', type=str, default=DEFAULT_HOST, help='Host address to bind the exporter to')
parser.add_argument('--interval', type=int, default=DEFAULT_INTERVAL, help='THIS OPTION DOES NOTHING') parser.add_argument('--interval', type=int, default=DEFAULT_INTERVAL, help='THIS OPTION DOES NOTHING')
parser.add_argument('--collect-running-vms', type=str, default='true', help='Enable or disable collecting running VMs metric (true/false)') parser.add_argument('--collect-running-vms', type=str, default='true', help='Enable or disable collecting running VMs metric (true/false)')
parser.add_argument('--collect-storage', type=str, default='true', help='Enable or disable collecting storage info (true/false)') parser.add_argument('--collect-storage', type=str, default='true', help='Enable or disable collecting storage info (true/false)')
@ -390,7 +388,7 @@ def main():
return return
else: else:
REGISTRY.register(PVECollector()) REGISTRY.register(PVECollector())
start_http_server(cli_args.port, addr=cli_args.host) start_http_server(cli_args.port)
while True: while True:
time.sleep(100) time.sleep(100)

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='pvemon', name='pvemon',
version = "1.3.3", version = "1.3.2",
packages=find_packages(), packages=find_packages(),
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [