Skip to content

Commit

Permalink
docs: Add new metrics to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyb3r-Jak3 committed Aug 1, 2024
1 parent 3ed476a commit 26f0536
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Required authentication scopes:

To authenticate this way, only set `CF_API_TOKEN` (omit `CF_API_EMAIL` and `CF_API_KEY`)

[Shortcut to create the API token](https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22firewall_services%22%2C%22type%22%3A%22read%22%7D%5D&name=Cloudflare+Exporter&accountId=*&zoneId=all)

### User email + API key
To authenticate with user email + API key, use the `Global API Key` from the Cloudflare dashboard.
Beware that this key authenticates with write access to every Cloudflare resource.
Expand Down Expand Up @@ -104,6 +106,9 @@ Note: `ZONE_<name>` configuration is not supported as flag.
# HELP cloudflare_zone_pool_requests_total Requests per pool
# HELP cloudflare_logpush_failed_jobs_account_count Number of failed logpush jobs on the account level
# HELP cloudflare_logpush_failed_jobs_zone_count Number of failed logpush jobs on the zone level
# HELP cloudflare_r2_operation_count Number of operations performed by R2
# HELP cloudflare_r2_storage_bytes Storage used by R2
# HELP cloudflare_r2_storage_total_bytes Total storage used by R2
```

## Helm chart repository
Expand Down
1 change: 0 additions & 1 deletion cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,6 @@ func fetchR2Account(accountID string) (*cloudflareResponseR2Account, error) {
now := time.Now().Add(-time.Duration(viper.GetInt("scrape_delay")) * time.Second).UTC()
s := 60 * time.Second
now = now.Truncate(s)
now1mAgo := now.Add(-60 * time.Second)

request := graphql.NewRequest(`query($accountID: String!, $limit: Int!, $date: String!) {
viewer {
Expand Down

0 comments on commit 26f0536

Please sign in to comment.