One of the greatest things I’ve found about Datadog agent is it’s extensible nature. While there are numerous OOB integrations, we often find an edge case or two that require some quick code and a custom check here and there.
This is a pretty basic check that looks to see if a file exists and if it does, reports a successful check, and if not, reports a check error tagged with the particular filename. Additionally, if the file does exist, file.age and file.modified metrics are reported back also tagged by filename. Handy for knowing if certain files exist and how old they may be.
You can find all of this code at the link above or just go to https://github.com/themsquared/datadog-checks/tree/master/file and check it out! You can find out more about the Datadog Agent and where these config and check files go by checking out the docs here: https://docs.datadoghq.com/agent/
Questions? Feel free to post them below or hit me up on any of my social media channels!