Hi, we have a requirement of ingesting pump Tags in influx db . The Tags header has a string of values including clients access key and TLS version , we want the whole Tags to be ingested into influx db, but we are unable to do so.
Kindly, find the reference below:
We have a Tag in our csv generated in tyk-pump we need to ingest that in the influx db.
The Tag includes values such as client-access-key, TLS version, appkeys etc.
I don’t see where you add tags to the csv pump shared. So it appears, I may have failed to understand your earlier statement
You can build a custom pump for your use case. The source of pump is open and available on GitHub, so you can modify it and add functionality based on your needs.
How did you add the tags client-access-key, TLS version, appkeys for csv?
In your config, I don’t observe a tags section within the csv pump. Maybe you can elaborate more.
About influxdb, are you saying the analytics tags are missing in your influxdb? Or are the custom tags client-access-key, TLS version, appkeys which you wish to add not being populated?
We are adding these 3 things in the gateway by using RecordRestHeader policy , then it is being pumped into the tyk-pump csv, now we want it to be ingested into influxDB , we have added that in
“tags”: [“method”, “path”, “response_code”, “api_key”, “time_stamp”, “api_version”, “api_name”, “api_id”, “org_id”, “oauth_id”, “raw_request”, “request_time”, “raw_response”, “ip_address”.“tlsversion”,“clientaccesskey” ]
}
but, these columns in influx db are being populated as null value
Thanks for expatiating. I now have a full understanding of the issue.
The CSV pump doesn’t have a tags filter. This means that any tags added to the API request would ultimately end up in storage. However, the influxdb has a filter based on the codebase. That filter ensures that only the default tags from the analytics are sent to your datasink. No custom tags are allowed
I could transform this thread into a feature request for the engineering team. However, decision to implement the said feature still rests with the engineering team.
I would suggest an alternative where you can modify the source code of pump and build a custom version for yourself. The suggestion is based on the fact that any added feature request would be available on the latest version of pump.
Pump should work on any version of the gateway but there have been some recent breaking changes. So considering your version is slightly old one v0.7.0, I would just advise that you edit the source and remove the limitation.