'Prometheus and nfs storage

As per prometheus storage.md , the recommendation is not to use nfs storage as persistent volume for prometheus.

But solutions like prometheus operator and openshift shows examples which uses nfs as persistent volumes for prometheus.

So what am I missing here? If nfs is not recommended then why do these tools share examples to use nfs as the storage options for prometheus?

Does anyone know what could be the nfs alternative for NetApp/ Trident for prometheus?



Solution 1:[1]

The example in the prom-operator docs is just a hypothetical to show how to manually control the storage provisioning. NFS is generally an option of last resort in all cases :) Check out https://kubernetes.io/docs/concepts/storage/persistent-volumes/ for more general information on how to use each of the various PV plugins (or if none of those work, look up CSI stuffs), but for NetApp you would probably use the iSCSI interface.

Solution 2:[2]

I have been using prometheus with NFS (NetApp) mounted disk on ubuntu for 4+ years already, 24/7 operation, with rather high frequency monitoring and relatively large dataset (currently at 500GB, but was scraped couple of times before).

Without single glitch, neither storage related, nor otherwise.

Also, from my experience, properly set NFS mount, from reliable storage server (NetApp/Ontap), with solid networking, is 'as good as local disk' for all of your favorite data hoarders. In my case, mysql, grafana, and prometheus all sit happily on ubuntu nfs mount... At Ontap side, the snapshots and optionally snapmirrors will cover most if not all backup needs.

Again, this is from my personal experience...

Solution 3:[3]

If you need to use NFS storage for Prometheus-like system, then give a try to VictoriaMetrics. It works in production on NFS and Amazon EFS without issues.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 coderanger
Solution 2 R. Simac
Solution 3 valyala