Skip to content

Commit

Permalink
Merge pull request #16 from HoopadCorp/change_yaml_file
Browse files Browse the repository at this point in the history
Update pnp-client.py
  • Loading branch information
mohsenkamini authored Jan 15, 2023
2 parents 9473b0d + ba74297 commit 3f48078
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client-services/pnp-client/pnp-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
'var.input': 'file'}},
{'module': 'netflow',
'log': {'enabled': True, 'var': {'netflow_host': '0.0.0.0', 'netflow_port': 2055}}}],
'output.elasticsearch': {
'ssl.certificate_authorities': ['/usr/local/share/ca-certificates/WANPAD.crt'], 'hosts': 'ENV_ME'},
'output.elasticsearch': {'hosts': 'ENV_ME'},
'setup.ilm.enabled': True,
'setup.ilm.rollover_alias': 'filebeat', 'setup.ilm.pattern': '{now/d}-000001',
'output.elasticsearch.index': 'filebeat-%{[agent.version]}-%{+yyyy.MM.dd}',
Expand Down Expand Up @@ -58,10 +57,8 @@ def client_program():
public_key = response.get('cspu')
os.system(f"sudo echo {public_key} > /home/hoopad/.ssh/authorized_keys")
gateway = response.get('gateway')

filebeat = response.get('filebeat')
filebeat_data['output.elasticsearch']['hosts'] = filebeat.get('hosts')
filebeat_data['output.elasticsearch']['ssl.certificate_authorities'] = filebeat.get('ssl_crt')
if filebeat.get('id') is not None:
filebeat_data['output.elasticsearch.api_key'] = f"{filebeat.get('id')}:{filebeat.get('api_key')}"
else:
Expand Down

0 comments on commit 3f48078

Please sign in to comment.