krakend / krakend-ce

KrakenD Community Edition: High-performance, stateless, declarative, API Gateway written in Go.
https://www.krakend.io
Apache License 2.0
1.98k stars 452 forks source link

Data do not push to influx db #293

Closed go4sachin007 closed 3 years ago

go4sachin007 commented 3 years ago

Please find my Krakend.json file

{ "version": 2, "extra_config": { "github_com/devopsfaith/krakend-opencensus": { "sample_rate": 100, "reporting_period": 1, "enabled_layers": { "backend": true, "router": true, "pipe": true }, "exporters": { "influxdb": { "address": "http://10.10.3.80:8086", "db": "krakend", "timeout": "1s" } } } }, "name": "My lovely gateway", "timeout": 10, "host": [ "http://10.10.3.80" ], "endpoints": [ { "endpoint": "/foo", "method": "POST", "headers_to_pass": [ "Content-Type" ], "querystring_params": [ "a_data", "check_user_name", "master_key" ], "backend": [ { "url_pattern": "/user_info-cas/services/rest.php/bebonetUser/checkUserName", "host": [ "http://10.10.2.109" ] } ], "concurrent_calls": "1", "max_rate": 100000 } ], "oauth": { "disable": true }, "cache_ttl": "5m", "timeout": "5s" }

When I execute this by command krakend run --config krakend1.json --port 8888

It gives error

Error when uploading stats to Influx: {"code":"unauthorized","message":"unauthorized access"}

Please help me I don't know am doing wrong because I am following the exact documentation

Thanks Sachin

alombarte commented 3 years ago

Hi Sachin, Please check if you have credentials on influxdb and the authorization levels you have. The error message is because KrakenD does not have the permission to push data on that influx

go4sachin007 commented 3 years ago

Hi,

Thanks for the Reply Yes it must be the issue of influxdb

I am facing issue exactly similar to below URL while making changes on settings

https://community.influxdata.com/t/influxdb-oss-2-0-1-giving-unauthorized-messages-after-install/16729

I don't know how to fix this "Unauthorized access" error on influx DB

Thanks Sachin

go4sachin007 commented 3 years ago

Hi Alombarte,

I had posted the question on the influxdb community, following is the answer I have received

https://github.com/influxdata/influxdb/issues/21278

Can you please confirm, It will be a great help

Thanks Sachin

kpacha commented 3 years ago

@go4sachin007 , yes, KrakenD supports all the configuration options exposed by the v1.x influxdb client: https://github.com/kpacha/opencensus-influxdb/blob/master/influxdb.go#L246-L247.

just add "username":"your_user", "password":"super_secret" to your influxdb exporter config

go4sachin007 commented 3 years ago

Nothing is happening with this as well

I am struggling with this type issue but nothing is clearly mentioned by you people

If you cannot provide support in clear word then clearly mention that you guys only help for enterprise user

I did my best effort to solve such issue for continuous 3 weeks but in vain

Simple Question: your documentation says

`InfluxDB is a time series database designed to handle high write and query loads.

The Opencensus exporter allows you export data to InfluxDB for monitoring metrics and events. Enabling it only requires you to add the influxdb exporter in the opencensus module.

The following configuration snippet sends data to your InfluxDB:` https://www.krakend.io/docs/telemetry/influxdb/

But nothing is happening

Please support or simply say that buy enterprise version, we will check other solutions

Thanks Sachin

alombarte commented 3 years ago

Hi @go4sachin007,

Thanks for your nice words and for appreciating our contributions to the open-source. I am sorry our uninterested efforts are of no value to you. I can maybe suggest a specific step by step tutorial to go through https://www.krakend.io/docs/overview/guides/

Please check the InfluxDB tutorial. It works.

go4sachin007 commented 3 years ago

Hi Alombrate

I am extremely sorry for being harsh, But you cannot imagine when you have to present something to management after covering the beautiful theory section and when you start implementing suddenly you get multiple issue which are not able to resolving these for long time and you are in a fix

I apologize once again

I will once again try this again

Thanks Sachin

kpacha commented 3 years ago

@go4sachin007 for getting quicker support from the community (at least for questions like yours), you can join our slack channel at the gophers' slack (https://gophers.slack.com/messages/krakend).

Just few days ago, a user posted:

Finaly, I found the conf for Krakend and Influxdb V2 ! • create a bucket on influxdb (krakenddb) • create a dbrp using influx v1 dbrp create command (db: krakenddbv18 mapped on krakenddb) • create a v1 user using influx v1 auth command with read/write rights on krakenddbv18 • use krakenddbv18 / v1 auth in parameters

cheers!

github-actions[bot] commented 2 years ago

This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.