Functionbeat not finding default credentials

I followed the guide to connect cloudwatch logs to kibana. After adding in my credentials and configs, the beat is not able to deploy to S3. I have the IAM permissions described.
I only get the following debugging logs:
2020-03-09T14:36:21.144-0400 INFO instance/beat.go:622 Home path: [C:\Program Files\Functionbeat] Config path: [C:\Program Files\Functionbeat] Data path: [/tmp] Logs path: [/tmp/logs]
2020-03-09T14:36:21.144-0400 DEBUG [beat] instance/beat.go:674 Beat metadata path: \tmp\meta.json
2020-03-09T14:36:21.144-0400 INFO instance/beat.go:630 Beat ID: c0fcb17c-41c2-4384-bd71-a0ad65082391
2020-03-09T14:36:21.168-0400 DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadata: starting to fetch metadata, timeout=3s
2020-03-09T14:36:21.169-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for openstack after 0s. result=[provider:openstack, error=failed requesting openstack metadata: Get http://169.254.169.254/2009-04-04/meta-data/instance-id: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}]
2020-03-09T14:36:21.169-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for aws after 1.0006ms. result=[provider:aws, error=failed requesting aws metadata: Get http://169.254.169.254/2014-02-25/dynamic/instance-identity/document: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}]
2020-03-09T14:36:21.169-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for az after 1.0006ms. result=[provider:az, error=failed requesting az metadata: Get http://169.254.169.254/metadata/instance/compute?api-version=2017-04-02: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}]
2020-03-09T14:36:21.169-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for gcp after 1.0006ms. result=[provider:gcp, error=failed requesting gcp metadata: Get http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}]
2020-03-09T14:36:21.169-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for digitalocean after 1.0006ms. result=[provider:digitalocean, error=failed requesting digitalocean metadata: Get http://169.254.169.254/metadata/v1.json: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}]
2020-03-09T14:36:21.170-0400 DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadata: fetchMetadata ran for 2.0004ms
2020-03-09T14:36:21.170-0400 INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected.
2020-03-09T14:36:21.170-0400 DEBUG [processors] processors/processor.go:101 Generated new processors: add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null
error while creating CLIManager: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

Thanks for your help.

1 Like

Hi,

are you running the functionbeat in the AWS environment or your personal one? I'm asking because there are references to Windows directories.

Could you please also share your config files with redacted credentials?

Hi,

I am running this locally, and I am trying to stream my AWS Cloudwatch logs to Elasticsearch/Kibana.
Here are my configs:
functionbeat.provider.aws.functions:

  • name: fn-cloudwatch-logs
    enabled: true
    type: cloudwatch_logs
    triggers:
    • log_group_name:
    • filter_pattern: "ERROR"
      functionbeat.provider.aws.deploy_bucket: my-bucket

output.elasticsearch:
hosts: ["url"]
username: "elastic"
password: "pass"
setup.kibana:
host: "url"
username; "username"
password: "pass"

Thanks for you help.

Im receiving same error.

Where you able to find out why you were getting that error?

Hi @Patrice1,

Since i don't use google cloud platform i decided to comment out these fields
e.x
functionbeat.provider.gcp.location_id: "europe-west2"
functionbeat.provider.gcp.project_id: "my-project-123456" functionbeat.provider.gcp.storage_name: "functionbeat-deploy"

Also commented out other fields related to google cloud platform.

Hope this will help

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.