title: Prometheus bulk import
body: <p>I live in a B2B world where I do not have direct access to my production systems, as they typically reside in some locked down customer lab.  I am able to get diagnostics and such, via the customer, when they are needed. </p>
  
  <p>What I'd like is to be able to analyse my node statistics in prometheus/graphana.  Assuming I get the customer to send me diags every day, this poses me three problems:</p>
  
  <ul>
  <li><p>What format should that diags be?  That's not a big deal, I expect I just get the customer to copy and tar up the stats from each node. </p></li>
  <li><p>When I get them my end, how can I make sure each node has a different label when exported into prometheus.  I think there are multiple ways to do that.  One might be to have a single node_exporter, use the file collector, prepend each metric with the node, and use a relabel.  Another (better) is to use the "name{label=X} val" format.  I think I'm still good, though happy for someone to tell me there is a better way. </p></li>
  <li><p>But I think I have a problem I can't solve with timestamps.  The issue is that I want each 5 minute snapshot of the system state to have the timestamp at which is was collected.  I can put the timestamp in each snapshot, but I don't think there is a way to give this to prometheus.</p></li>
  </ul>
  
  <p>I've found things like this <a href="https://github.com/Cleafy/promqueen/blob/master/README.md" rel="nofollow noreferrer">https://github.com/Cleafy/promqueen/blob/master/README.md</a> and <a href="https://github.com/prometheus/prometheus/issues/535" rel="nofollow noreferrer">https://github.com/prometheus/prometheus/issues/535</a>
  but they aren't quite in the same problem space I am. Am I missing some exporter, param, or anything else that would allow me to accomplish the goal of exporting a days worth of data in one go?</p>
  
  <p>Update:  I've made quite a bit of progress, and now I'm worried won't have a solution at all let alone a correct architecture. </p>
  
  <p>It seems in my second bullet (how to identify servers), using the metric the name doesn't work as servers have "." in them.  And adding as an "instance" label doesn't work as the node_exporter doesn't honor them, even when I put "honor_labels" in the scrape config.  So the node_exporter doesn't work as an approach for this.  Luckily the pushgateway does do this and respects the instance label (passed on the URL). </p>
  
  <p>But on the third (how to add the time). node_exporter does allow this. But pushgateway does not (or at least the docs explicity say it does not). </p>
  
  <p>So, on the face of it neither exporter does what I need it to do.  I suppose it may be time to fork one of those, and write some code.  But I'm not keen on that. </p>