Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tommaso-ascani committed Oct 28, 2024
1 parent 4662fe4 commit 8c8293a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion imageroot/bin/cloud-log-manager-forwarder
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ else:
logs_list = []

logql_stream_selector = ' {node_id=~".+"} '
if FILTER != None:
if FILTER:
logql_stream_selector = ' {node_id=~".+",category="' + FILTER + '"} '

while True:
Expand Down
6 changes: 1 addition & 5 deletions imageroot/bin/syslog-forwarder
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ else:
os.remove("./syslog_last_timestamp")

logql_stream_selector = ' {node_id=~".+"}'
if FILTER != None:
if FILTER:
logql_stream_selector = ' {node_id=~".+",category="' + FILTER + '"}'

# Every x seconds execute logcli command and send logs to syslog server
Expand All @@ -85,10 +85,6 @@ while True:
# Log if stdout contains something new
if log:
json_object = json.loads(log)
labels = json_object["labels"]

if FILTER != None and FILTER not in labels:
continue

line = json.loads(json_object["line"])

Expand Down

0 comments on commit 8c8293a

Please sign in to comment.