On 07/03/2020 20:16, Yagyansh S. Kumar wrote:
Is it necessary that the output should be a float value? What if I want to scrape something else? For eg. I want to scrape the version of VMWare-Tools running in the VM. I have stored that in a file in Prometheus format but I am getting the below error: text format parsing error in line 1: expected float as value, got "'*10.3.10.10540*'"
The bold is the output that I need to push to prometheus.


Prometheus only deals in floats, but labels can be any string.

So for this case it's common to set the value to "1" and then have a "version" tag.


On Sunday, March 8, 2020 at 12:01:35 AM UTC+5:30, Murali Krishna Kanagala wrote:

    Just drop a text file with data in Prometheus format and pass it
    as a command line arguments on your node exporter.

    https://prometheus.io/docs/concepts/data_model/
    <https://prometheus.io/docs/concepts/data_model/>

    https://github.com/prometheus/node_exporter/blob/master/README.md
    <https://github.com/prometheus/node_exporter/blob/master/README.md>

    On Sat, Mar 7, 2020, 11:01 AM Yagyansh S. Kumar
    <[email protected] <javascript:>> wrote:

        Hi. I am just now able to get my head around the working of
        textfile collector. Can someone explain or provide a good link
        to understand its working?

        Thanks!
-- You received this message because you are subscribed to the
        Google Groups "Prometheus Users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected] <javascript:>.
        To view this discussion on the web visit
        
https://groups.google.com/d/msgid/prometheus-users/19715622-31e6-402e-8497-49448f6f0b95%40googlegroups.com
        
<https://groups.google.com/d/msgid/prometheus-users/19715622-31e6-402e-8497-49448f6f0b95%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/71c47c5f-2c24-4714-a675-c3368b81086b%40googlegroups.com <https://groups.google.com/d/msgid/prometheus-users/71c47c5f-2c24-4714-a675-c3368b81086b%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/aac02861-f04d-c5f0-7fd4-187b7cfd30cb%40Jahingo.com.

Reply via email to