Could you please explain your use-case? Depending on your use-case, there are multiple solutions that fit in different use-cases.
Plug & Play Solutions:
Matomo: It's basically on-premise Google Analytics, it stores the data on Mysql and provides pageview & event metrics. (https://github.com/matomo-org/matomo)
Countly: It's the extensible version of Matomo on top of Mongodb. While storing the raw data might not be their best bet, if you're looking for event analytics dashboard with pre-built features, it's definitely worth trying out. (https://github.com/Countly/countly-server)
Self-service Solutions:
Snowplow: It's an enterprise level event analytics solution. It's really extensible and it supports many different data-warehouse solutions such as Elasticsearch, Redshift, etc. but not that easy to learn & maintain. (https://github.com/snowplow/snowplow)
Rakam: Similar to Snowplow, it collects and enriches event data and stores it in your data warehouse. We support Postgresql, Snowflake, and Prestodb at the moment. Unlike Snowplow, you send the event data without defining the schema, we generate the schema on the fly for you which makes it similar to Amplitude. (https://github.com/rakam-io/rakam)
Disclaimer: I'm the maintainer of Rakam.