about summary refs log tree commit diff
path: root/diskstats.c
diff options
context:
space:
mode:
authorHeikki Kallasjoki <fis@zem.fi>2018-12-07 01:43:22 +0000
committerHeikki Kallasjoki <fis+github@zem.fi>2018-12-12 19:10:51 +0000
commit6adc487e0887ad8dfb5ce7024b448fafd0bed943 (patch)
tree412f9373b6069e97775b4cadb8a219a35256d75b /diskstats.c
parent8569c2c85bec19daa36e013448399c42cf75a257 (diff)
downloadnano-exporter-6adc487e0887ad8dfb5ce7024b448fafd0bed943.tar.gz
nano-exporter-6adc487e0887ad8dfb5ce7024b448fafd0bed943.tar.xz
nano-exporter-6adc487e0887ad8dfb5ce7024b448fafd0bed943.zip
Add basic test for the diskstats collector.
Diffstat (limited to 'diskstats.c')
-rw-r--r--diskstats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diskstats.c b/diskstats.c
index 81231aa..9e4ecd1 100644
--- a/diskstats.c
+++ b/diskstats.c
@@ -106,7 +106,7 @@ static void diskstats_collect(scrape_req *req, void *ctx_ptr) {
 
   // emit metrics for all known columns of /proc/diskstats for included devices
 
-  f = fopen("/proc/diskstats", "r");
+  f = fopen(PATH("/proc/diskstats"), "r");
   if (!f)
     return;