2021-07-13 12:04:35 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
#
|
|
|
|
# Generate some simple line protocol. Usage:
|
|
|
|
#
|
|
|
|
# ```
|
|
|
|
# ./scripts/genlp.py | head -n 2000
|
|
|
|
# ```
|
|
|
|
#
|
2021-08-19 19:22:51 +00:00
|
|
|
# Please use iox_data_generator for anything more complicated.
|
2021-07-13 12:04:35 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
from signal import signal, SIGPIPE, SIG_DFL
|
|
|
|
signal(SIGPIPE, SIG_DFL)
|
|
|
|
|
|
|
|
c=0
|
|
|
|
while True:
|
|
|
|
for i in range(1, 1000):
|
|
|
|
for j in range(1, 1000):
|
|
|
|
c = c + 1
|
|
|
|
print(f"cpu,hostname=host-{i},nodename=node-{j} cpu_seconds={c}")
|