def regular_chaining():
try:
open("file_doesnt_exist.txt")
except Exception as e:
raise ValueError("Couldn't open specified file!") from e
Running regular_chaining()
BLOCK ULID MIN TIME MAX TIME DURATION NUM SAMPLES NUM CHUNKS NUM SERIES SIZE | |
01GBM13DBXT6XN3ZGKJPJ2V7WR 1661536800002 1661731200000 53h59m59.998s 70112453167 601119200 12427715 148653439698 | |
01GBSSDM8T2KVZYPKRG4JTJ2N8 1661731200002 1661925600000 53h59m59.998s 70383398509 605278955 12671976 147864644815 | |
01GBZV1489385KQPKN089V1PT7 1661925600025 1662120000000 53h59m59.975s 70549912421 604845812 12651303 144103503098 | |
01GC5D0FRGVF2DNK2WV0MD9C1T 1662120000027 1662314400000 53h59m59.973s 67869892593 593215701 12530552 116217062371 | |
01GCB6D2ERZKD15MJ924BNYDWH 1662314400031 1662508800000 53h59m59.969s 70322198493 602890695 12632449 117301314338 | |
01GCGZV8SPWJZ2A348G0ZCPDEY 1662508800031 1662703200000 53h59m59.969s 70294210625 604614308 12684735 124143212184 | |
01GCPS876M0SF4459H4NNZSG9V 1662703200056 1662897600000 53h59m59.944s 71239262815 610539678 12644227 128263076465 | |
01GCWJMRNWAJAN6NPHJHGMFT6Y 1662 |
# __ __ __ | |
# \ \ / / / / | |
# \ V / / / | |
# \_/ \/ | |
# | |
# V E C T O R | |
# Configuration | |
# | |
# ------------------------------------------------------------------------------ | |
# Website: https://vector.dev |
import requests | |
from csv import writer | |
BASEURL = "http://prometheus.example.com:9090/api/v1" | |
s = requests.sessions.Session() | |
QUERY = 'windows_exporter_build_info{version!="0.15.0"}' | |
resp = s.get(BASEURL + '/query', params={"query": QUERY}) | |
with open("prometheus.csv", 'w') as file: |
- job_name: 'icmp' | |
metrics_path: /probe | |
params: | |
module: [icmp] | |
file_sd_configs: | |
- files: | |
- /conf/targets/lu_*.json | |
relabel_configs: | |
- source_labels: [__address__] | |
regex: (.*?)(:[0-9]+)? |
route: | |
receiver: slack | |
receivers: | |
- name: 'slack' | |
slack_configs: | |
- api_url: xxx | |
icon_url: https://avatars3.githubusercontent.com/u/3380462 | |
channel: '#xxx' | |
fields: | |
- title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .GroupLabels.alertname }} - {{ range .Alerts }} {{ .Labels.severity }} {{ end }}' |