I want to setup monitoring on our environment. I am wondering on what are the advantages of using something like Prometheus for making metrics vs. just using something like the ELK stack for creating similar metrics using logs?
If you don't need the file it saves space and trouble to leave it out. Logs require rotation and retention policies which are nice to skip.
Skipping the file avoids issues with the file that could caused lost metrics like a full disk.
Skipping the file means that you remove latency from disk I/O. For most metrics you don't care if they show up a few seconds late, but if you're trying to build things to respond to some metric quickly. You might want to put it on Kafka also.
The basic difference between prometheus metrics And logs is that prometheus is a timeseries db while logs - in General sense - are event driven.
Thus using prometheus is suitable for monitoring the whole lifecycle of your endpoints, making aggregations on results And generally evaluating the behaviour of your target before something occurs.
Logs are more suitable if you want reportin when something particular happens, in an order of events And generally tracking down incidents after they've already happened.