Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
memcached2influx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lnf-da-control
memcached2influx
Commits
47e021d0
Commit
47e021d0
authored
1 year ago
by
Andrea Michelotti
Browse files
Options
Downloads
Patches
Plain Diff
update multi key
parent
fc4aa097
No related branches found
No related tags found
No related merge requests found
Pipeline
#105888
failed
1 year ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flame.txt
+18
-0
18 additions, 0 deletions
flame.txt
memcached2Influx.py
+7
-4
7 additions, 4 deletions
memcached2Influx.py
with
25 additions
and
4 deletions
flame.txt
0 → 100644
+
18
−
0
View file @
47e021d0
{
"dataset":[
{
"name":"flame_state",
"type":"json",
"description":"Flame state",
"offset":0,
"len":512,
"keybind":"FLAME_STATE"
},{
"name":"flame_state",
"type":"json",
"description":"Flame state STR",
"offset":0,
"len":512,
"keybind":"FLAME_STATE_STR"
}]
}
This diff is collapsed.
Click to expand it.
memcached2Influx.py
+
7
−
4
View file @
47e021d0
...
...
@@ -125,6 +125,7 @@ except:
if
args
.
key
:
vector_key
=
split_list
=
args
.
key
.
split
(
"
,
"
)
# Splitting at comma delimiter
try
:
args
.
keyRate
=
int
(
args
.
keyRate
)
except
ValueError
as
e
:
...
...
@@ -135,12 +136,14 @@ if args.key:
name
=
args
.
keyName
else
:
name
=
args
.
key
while
True
:
payload
=
[]
payload
=
jsonKey2Influx
(
args
.
key
,
clientMemcached
,
name
)
print
(
'
Publishing data
'
)
print
(
payload
)
clientInflux
.
write_points
(
payload
)
for
s
in
vector_key
:
payload
=
jsonKey2Influx
(
s
,
clientMemcached
,
s
)
print
(
'
Publishing data
'
)
print
(
payload
)
clientInflux
.
write_points
(
payload
)
time
.
sleep
(
args
.
keyRate
)
elif
args
.
file
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment