Skip to content

Commit

Permalink
Merge pull request #12 from HoopadCorp/filebeat_change_error
Browse files Browse the repository at this point in the history
Update pnp-client.py
  • Loading branch information
mohsenkamini authored Jan 9, 2023
2 parents 9301d09 + 1d50149 commit b492107
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client-services/pnp-client/pnp-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def client_program():
filebeat = response.get('filebeat')
filebeat_data['output.elasticsearch']['hosts'] = filebeat.get('hosts')
filebeat_data['output.elasticsearch']['ssl.certificate_authorities'] = filebeat.get('ssl_crt')
filebeat_data['output.elasticsearch.api_key'] = f"{filebeat.get('id')}:{filebeat.get('api_key')}"
if filebeat.get('_id') is not None:
filebeat_data['output.elasticsearch.api_key'] = f"{filebeat.get('_id')}:{filebeat.get('api_key')}"
else:
print('Error in Filebeat: No Filebeat API Key.')

create_file_beat(filebeat_data, filebeat.get('conf_address'))

Expand Down

0 comments on commit b492107

Please sign in to comment.