|
1 | 1 |
|
2 | | -# eol-exporter |
| 2 | +# eol-prometheus-exporter |
3 | 3 |
|
4 | | -   |
| 4 | +   |
| 5 | + |
| 6 | +End of life prometheus exporter. |
5 | 7 |
|
6 | | -End of life exporter. |
7 | 8 | A Kubernetes's helm chart for a exporter that get information about end of life/support of products in order to be scrapped by Prometheus |
8 | 9 |
|
9 | | -You must supply a valid configmap with a list of products with its versions. Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/config.yaml.example |
10 | | -for example values. |
11 | | -Each product must have a field `current` with valid version as defined in: https://endoflife.date/api/{product}.json |
| 10 | +You must supply a valid configmap with a list of products with its versions: |
| 11 | + |
| 12 | +```yaml |
| 13 | +# Get available products from: |
| 14 | +# https://endoflife.date/api/all.json |
| 15 | +# and find available cycles in: |
| 16 | +# https://endoflife.date/api/{product}.json |
| 17 | +eks: |
| 18 | + current: '1.30' |
| 19 | + comment: EKS |
| 20 | +django: |
| 21 | + current: '5.1' |
| 22 | + comment: backend |
| 23 | +``` |
| 24 | +
|
| 25 | +Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/config.yaml.example |
| 26 | +for more example values. |
| 27 | +
|
| 28 | +Each product must have a field `current` with valid version as defined in: https://endoflife.date/api/{product}.json. |
| 29 | + |
12 | 30 | A `comment` field is optional, and it will be added as a label in the metrics. |
13 | 31 |
|
14 | 32 | A Prometheus extra scrape config must be configured in order to be able to watch the metrics in Prometheus. |
15 | | -The service name will be defined as: $CHART_NAME.$NAMESPACE:$PORT |
16 | | -By default this is: eol-exporter.prometheus:8080 |
17 | | -An example extraScrapeConfigs is available in: https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/README.md#prometheus-server-config |
| 33 | + |
| 34 | +The service name will be defined as: `$CHART_NAME.$NAMESPACE:$PORT`. |
| 35 | +By default this is: `eol-exporter.prometheus:8080`: |
| 36 | + |
| 37 | +```yaml |
| 38 | +extraScrapeConfigs: | |
| 39 | +- job_name: prometheus-eol-exporter |
| 40 | + metrics_path: /metrics |
| 41 | + scrape_interval: 5m |
| 42 | + scrape_timeout: 30s |
| 43 | + static_configs: |
| 44 | + - targets: |
| 45 | + - eol-exporter.prometheus:8080 |
| 46 | +``` |
| 47 | + |
| 48 | +Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/README.md#prometheus-server-config for more information |
18 | 49 |
|
19 | 50 | The exporter provides two metrics: |
20 | | -- endoflife_expiration_timestamp_seconds: Information about end of life (EOL) of products. Metric value is the UNIX timestamp of the eolDate label |
21 | | -- endoflife_expired: Information about end of life (EOL) of products. Boolean value of 1 for expired products. |
| 51 | +- `endoflife_expiration_timestamp_seconds`: Information about end of life (EOL) of products. Metric value is the UNIX timestamp of the eolDate label |
| 52 | +- `endoflife_expired`: Information about end of life (EOL) of products. Boolean value of 1 for expired products. |
| 53 | + |
| 54 | +Sample query to get if EKS EOL is less than 30 days: |
| 55 | + |
| 56 | +```sh |
| 57 | +(endoflife_expiration_timestamp_seconds{name="eks"} - time()) > ((60*60*24) * 10) and (endoflife_expiration_timestamp_seconds{name="eks"} - time()) <= ((60*60*24) * 30) |
| 58 | +``` |
| 59 | + |
| 60 | +Sample query to get if EKS EOL has already happened: |
| 61 | + |
| 62 | +```sh |
| 63 | +endoflife_expired{name="eks"} == 1 |
| 64 | +``` |
22 | 65 |
|
23 | 66 | ## Requirements |
24 | 67 |
|
25 | 68 | | Repository | Name | Version | |
26 | 69 | |------------|------|---------| |
27 | | -| https://stakater.github.io/stakater-charts/ | eol-exporter(application) | 5.1.0 | |
| 70 | +| https://stakater.github.io/stakater-charts/ | exporter(application) | 5.1.0 | |
28 | 71 |
|
29 | 72 | ## Values |
30 | 73 |
|
@@ -55,7 +98,7 @@ The exporter provides two metrics: |
55 | 98 | | eol-exporter.deployment.image.digest | string | `""` | | |
56 | 99 | | eol-exporter.deployment.image.pullPolicy | string | `"IfNotPresent"` | | |
57 | 100 | | eol-exporter.deployment.image.repository | string | `"saritasallc/eol-exporter"` | | |
58 | | -| eol-exporter.deployment.image.tag | string | `"prod-843dabc"` | | |
| 101 | +| eol-exporter.deployment.image.tag | string | `"0.1.0"` | | |
59 | 102 | | eol-exporter.deployment.initContainers | list | `[]` | | |
60 | 103 | | eol-exporter.deployment.livenessProbe.enabled | bool | `true` | | |
61 | 104 | | eol-exporter.deployment.livenessProbe.exec | object | `{}` | | |
|
0 commit comments