flexmetric 0.3.1__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {flexmetric-0.3.1 → flexmetric-0.3.3}/PKG-INFO +26 -1
  2. {flexmetric-0.3.1 → flexmetric-0.3.3}/README.md +25 -0
  3. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric.egg-info/PKG-INFO +26 -1
  4. {flexmetric-0.3.1 → flexmetric-0.3.3}/setup.py +1 -1
  5. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/__init__.py +0 -0
  6. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/config/__init__.py +0 -0
  7. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/config/configuration.py +0 -0
  8. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/file_recognition/__init__.py +0 -0
  9. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/file_recognition/exec_file.py +0 -0
  10. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/logging_module/__init__.py +0 -0
  11. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/logging_module/logger.py +0 -0
  12. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/metric_process/__init__.py +0 -0
  13. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/metric_process/database_processing.py +0 -0
  14. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/metric_process/expiring_queue.py +0 -0
  15. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/metric_process/process_commands.py +0 -0
  16. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/metric_process/prometheus_agent.py +0 -0
  17. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric/metric_process/views.py +0 -0
  18. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric.egg-info/SOURCES.txt +0 -0
  19. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric.egg-info/dependency_links.txt +0 -0
  20. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric.egg-info/entry_points.txt +0 -0
  21. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric.egg-info/requires.txt +0 -0
  22. {flexmetric-0.3.1 → flexmetric-0.3.3}/flexmetric.egg-info/top_level.txt +0 -0
  23. {flexmetric-0.3.1 → flexmetric-0.3.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexmetric
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: A secure flexible Prometheus exporter for commands, databases, functions, and scripts.
5
5
  Home-page: https://github.com/nikhillingadhal1999/flexmetric
6
6
  Author: Nikhil Lingadhal
@@ -156,8 +156,31 @@ commands:
156
156
  - name: disk_usage
157
157
  command: df -h
158
158
  label: path
159
+ label_column: -1
160
+ value_column: 4
159
161
  timeout_seconds: 60
160
162
  ```
163
+ Example to select label_column and value_column
164
+
165
+ ```bash
166
+ Filesystem Size Used Avail Use% Mounted on
167
+ /dev/sda1 50G 20G 28G 42% /
168
+ /dev/sdb1 100G 10G 85G 10% /data
169
+ ```
170
+ ## Fields description
171
+
172
+
173
+ | Field | Description |
174
+ |------------------|-----------------------------------------------------------------------------|
175
+ | `name` | The **name** of the metric (`disk_usage`). This is the metric name seen in Prometheus. |
176
+ | `command` | The **shell command** to execute (`df -h` in this case). |
177
+ | `label` | The **label name** to attach to the metric (`path`). |
178
+ | `label_column` | The **column index** from the command's output to use as the label. Here `-1` means the **last column** (typically the mount path in `df -h`). |
179
+ | `value_column` | The **column index** from the command's output to extract the **numeric value**. Here `4` refers to the fifth column, which is usually the **Use%** in `df -h`. |
180
+ | `timeout_seconds`| How long (in seconds) to wait for the command before timing out. Here it's set to `60` seconds. |
181
+
182
+ ## Database mode
183
+
161
184
  ```yaml
162
185
  databases:
163
186
  - name: mydb
@@ -173,6 +196,8 @@ queries:
173
196
  label: table
174
197
  label_value: users
175
198
  ```
199
+ ## Functions mode
200
+
176
201
  executable_functions.txt
177
202
  ```
178
203
  function_name_1
@@ -123,8 +123,31 @@ commands:
123
123
  - name: disk_usage
124
124
  command: df -h
125
125
  label: path
126
+ label_column: -1
127
+ value_column: 4
126
128
  timeout_seconds: 60
127
129
  ```
130
+ Example to select label_column and value_column
131
+
132
+ ```bash
133
+ Filesystem Size Used Avail Use% Mounted on
134
+ /dev/sda1 50G 20G 28G 42% /
135
+ /dev/sdb1 100G 10G 85G 10% /data
136
+ ```
137
+ ## Fields description
138
+
139
+
140
+ | Field | Description |
141
+ |------------------|-----------------------------------------------------------------------------|
142
+ | `name` | The **name** of the metric (`disk_usage`). This is the metric name seen in Prometheus. |
143
+ | `command` | The **shell command** to execute (`df -h` in this case). |
144
+ | `label` | The **label name** to attach to the metric (`path`). |
145
+ | `label_column` | The **column index** from the command's output to use as the label. Here `-1` means the **last column** (typically the mount path in `df -h`). |
146
+ | `value_column` | The **column index** from the command's output to extract the **numeric value**. Here `4` refers to the fifth column, which is usually the **Use%** in `df -h`. |
147
+ | `timeout_seconds`| How long (in seconds) to wait for the command before timing out. Here it's set to `60` seconds. |
148
+
149
+ ## Database mode
150
+
128
151
  ```yaml
129
152
  databases:
130
153
  - name: mydb
@@ -140,6 +163,8 @@ queries:
140
163
  label: table
141
164
  label_value: users
142
165
  ```
166
+ ## Functions mode
167
+
143
168
  executable_functions.txt
144
169
  ```
145
170
  function_name_1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexmetric
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: A secure flexible Prometheus exporter for commands, databases, functions, and scripts.
5
5
  Home-page: https://github.com/nikhillingadhal1999/flexmetric
6
6
  Author: Nikhil Lingadhal
@@ -156,8 +156,31 @@ commands:
156
156
  - name: disk_usage
157
157
  command: df -h
158
158
  label: path
159
+ label_column: -1
160
+ value_column: 4
159
161
  timeout_seconds: 60
160
162
  ```
163
+ Example to select label_column and value_column
164
+
165
+ ```bash
166
+ Filesystem Size Used Avail Use% Mounted on
167
+ /dev/sda1 50G 20G 28G 42% /
168
+ /dev/sdb1 100G 10G 85G 10% /data
169
+ ```
170
+ ## Fields description
171
+
172
+
173
+ | Field | Description |
174
+ |------------------|-----------------------------------------------------------------------------|
175
+ | `name` | The **name** of the metric (`disk_usage`). This is the metric name seen in Prometheus. |
176
+ | `command` | The **shell command** to execute (`df -h` in this case). |
177
+ | `label` | The **label name** to attach to the metric (`path`). |
178
+ | `label_column` | The **column index** from the command's output to use as the label. Here `-1` means the **last column** (typically the mount path in `df -h`). |
179
+ | `value_column` | The **column index** from the command's output to extract the **numeric value**. Here `4` refers to the fifth column, which is usually the **Use%** in `df -h`. |
180
+ | `timeout_seconds`| How long (in seconds) to wait for the command before timing out. Here it's set to `60` seconds. |
181
+
182
+ ## Database mode
183
+
161
184
  ```yaml
162
185
  databases:
163
186
  - name: mydb
@@ -173,6 +196,8 @@ queries:
173
196
  label: table
174
197
  label_value: users
175
198
  ```
199
+ ## Functions mode
200
+
176
201
  executable_functions.txt
177
202
  ```
178
203
  function_name_1
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="flexmetric",
5
- version="0.3.1",
5
+ version="0.3.3",
6
6
  author="Nikhil Lingadhal",
7
7
  description="A secure flexible Prometheus exporter for commands, databases, functions, and scripts.",
8
8
  long_description=open("README.md").read(),
File without changes