Skip to content

Commit

Permalink
Fix CLM configuration error (#29)
Browse files Browse the repository at this point in the history
The "filter" field is optional, ensure it is present before setting the
environment variable.

Refs  NethServer/dev#7061
  • Loading branch information
DavidePrincipi authored Nov 4, 2024
1 parent 59efa1b commit 59b9409
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imageroot/actions/set-clm-forwarder/10set
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ if not bool(subscription):
if (request['active']):
agent.set_env('CLOUD_LOG_MANAGER_ADDRESS', f"{request['address']}")
agent.set_env('CLOUD_LOG_MANAGER_TENANT', f"{request['tenant']}")
agent.set_env('CLOUD_LOG_MANAGER_FILTER', f"{request['filter']}")
if 'filter' in request:
agent.set_env('CLOUD_LOG_MANAGER_FILTER', request['filter'])

if 'start_time' in request and request['start_time'] != '':
agent.set_env('CLOUD_LOG_MANAGER_START_TIME', f"{request['start_time']}")
Expand Down

0 comments on commit 59b9409

Please sign in to comment.