You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+68-3Lines changed: 68 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,77 @@ All notable changes to this project will be documented in this file.
4
4
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).
5
5
6
6
<!--next-version-placeholder-->
7
-
## 0.4.1 / 2025-03-30 - not release
7
+
## 0.4.1 / 2025-06-04
8
+
9
+
- added: new contrib [apache_exporter configuration](./contribs/apache/README.md). a good example to introduce javascript code to build metrics.
10
+
11
+
### 2025-05-25 - not release
12
+
13
+
- added: support for env vars in target_config [see issue #1](https://github.com/peekjef72/httpapi_exporter/issues/1) :
14
+
15
+
e.g.:
16
+
17
+
```yaml
18
+
targets:
19
+
- name: my_target
20
+
scheme: https
21
+
host: $env:MY_HOST_ENV_VAR_NAME
22
+
port: 443
23
+
```
24
+
25
+
### 2025-05-16 - not release
26
+
27
+
- changed: internal "scope" directive: add error and debug msg.
28
+
- added: new parameter 'collector' to '/metrics' entry point. Collect only the specified collector(s). May be use to collect specific metrics in a particular prometheus job.
29
+
30
+
### 2025-05-07 - not release
31
+
32
+
#### BREAKING CHANGE
33
+
34
+
- renamed: variable `results_code` to `status_code`
35
+
=> update all config profiles !
36
+
- changed: in log line renamed 'collid' to 'coll' and use collector name instead of a sequential number.
37
+
38
+
### 2025-05-06 - not release
39
+
40
+
- added: support for `javascript code` in each field, as an alternative to gotemplate. This part is still in development (see examples)
41
+
42
+
- added: new metric named "query_status" (prefixed by metric_prefix) and labeled by url query stage. The goal is to provide a always generated value for each queried url with the http status code as value. The generation is conditionned by the status attribute from each query action and the default value is false.
43
+
44
+
```yaml
45
+
- name: check api url
46
+
query:
47
+
url: /api/health
48
+
method: GET
49
+
status: true
50
+
trace: true
51
+
```
52
+
53
+
will provide:
54
+
55
+
```text
56
+
# HELP xxx_query_status query http status label by phase(url): http return code
57
+
# TYPE xxx_query_status gauge
58
+
xxx_query_status{phase="/api/health"} 200
59
+
# HELP xxx_query_perf_seconds query stage duration in seconds
If the request is not perfomed (target is down), the status code is 0.
8
73
9
74
### 2025-03-26 - not release
10
75
11
76
- added: global config parameter tls_version that allows to add old tls ciphers, because of golang change since 1.22: see [config](doc/config.md); update the netscaler default config file to use tls_version: all
12
-
- code refactored to use [cast](github.com/spf13/cast) for type conversion in internal functions.
77
+
- code refactored to use [cast](http://github.com/spf13/cast) for type conversion in internal functions.
13
78
- added: scripting language evolution to allow named var into expr : `$var_name.${another_varname[.attr1]}[.attr2]`
14
79
- changed: loglevel trace from warn to debug for metrics not found:
15
80
@@ -27,7 +92,7 @@ e.g.:
27
92
28
93
The same behavior is implemented for variables used in `loop` or `with_items` action.
29
94
30
-
### BREAKING CHANGE
95
+
#### BREAKING CHANGE
31
96
32
97
- remove feature that allows to set a single text not preceded by $ sign as value for key_labels or values:
Go template is used to manipulate data. So templates inherits from go functions and [sprig](https://masterminds.github.io/sprig/) v3 functions.
239
-
Because the exporter uses most of the time data of type "any (interface{})" some of the sprig functions failed.
240
-
Here is the list of exporter functions:
241
-
242
-
name| usage | e.g. |
243
-
--|---|---|
244
-
exporterDecryptPass | | |
245
-
exporterGet [varmap] [keyname] | get the keyname from the map. Like sprig/get function but accepts data of type map[any]any | exporterGet .svclb .svc |
246
-
exporterSet | | |
247
-
exporterKeys | | |
248
-
exporterValues | | |
249
-
exporterToRawJson | | |
250
-
&nsbp; | | |
251
-
lookupAddr [varstring] | obtain hostname from string representing an ip address ; like sprig/getHostByName but for string ip | lookupAddr .node.ipaddress |
252
-
convertToBytes value unit | convert the value contained in variable to bytes according to the unit string specified: <ul><li>"kilobyte" or "Kb" multiply by 1024 <li>"megabyte" or "Mb" multiply by 1024 * 1024<li>"gigabyte" or "Gb"multiply by 1024 * 1024 * 1024</ul> | '{{ convertToBytes .result.totalMiB "Mb" }}' |
253
-
convertBoolToInt value | convert value that may contain a boolean to 0|1 representation. Value can be of any type. If something is <ul><li>like int or float and different from 0 is 1 else 0<li>string and is lower case 'true' or 'yes' or 'ok' is 1 else 0<li>like map or array and length >0 then 1 or 0</ul>| with {"proc": {"loopCrashing": "true",...}}<br> => '{{ convertBoolToInt .proc.loopCrashing }}<br> => 1' |
254
-
getHeader [varmap] | | |
255
-
LEN [var] | obtain the len of the var. works like sprig/len but accepts data of type any. | |
256
-
exporterRegexExtract [regexp var] [search var] : []string | obtain the list of extracted elements from regexp on search string or nil if not found | extract value from line as group 1 of regexp: <br> res: "{{ index (exporterRegexExtract "^status:\s(.+)$" "status:OK") 1 }}" |
257
-
258
-
## boolean checks
259
-
260
-
name| usage | e.g. |
261
-
---|---|---|
262
-
EQ [var1] [var2] | check equality for 2 variables; accepts any type of data; meaning that the second will be converted to the type of the first | EQ .val "2" |
0 commit comments