Skip to content

Commit

Permalink
Fix coralogix_token param
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaveMyYard committed Apr 26, 2024
1 parent 5695c66 commit 1d18a31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ Additional optional parameters are:
<details id="coralogix-managed-prometheus">
<summary>Coralogix Managed Prometheus</summary>

For Coralogix managed Prometheus you need to specify your Prometheus link and add the flag coralogix_token with your Logs Query Key
For Coralogix managed Prometheus you need to specify your Prometheus link and add the flag coralogix_token with your Logs Query Key. You can find a correct url in [Coralogix Endpoint Docs](https://coralogix.com/docs/coralogix-endpoints/).

```sh
python krr.py simple -p "https://prom-api.coralogix..." --coralogix_token
python krr.py simple -p "https://ng-api-http.<domain>/metrics" --coralogix-token <your_token>
```

<p ><a href="#scanning-with-a-centralized-prometheus">See here about configuring labels for centralized prometheus</a></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def __init__(
headers = settings.prometheus_other_headers
headers |= self.additional_headers

if self.auth_header:
if settings.coralogix_token:
headers |= {"Authorization": f"Bearer {settings.coralogix_token}"}
elif self.auth_header:
headers |= {"Authorization": self.auth_header}
elif not settings.inside_cluster and self.api_client is not None:
self.api_client.update_params_for_auth(headers, {}, ["BearerToken"])
Expand Down

0 comments on commit 1d18a31

Please sign in to comment.