I checked again that the info we require can be shown with ifconfig 
command. We want to get "eth0:AAA" . Is there any metric include this value?

username@hostname:~> ifconfig
eth0      Link encap:Ethernet  HWaddr FA:
          xxxxxxx
          ..........................

*eth0:AAA* Link encap:Ethernet  HWaddr FA:
          inet addr:  Bcast:  Mask:
          UP BROADCAST RUNNING MULTICAST   Metric:

On Thursday, September 9, 2021 at 10:53:46 AM UTC+8 nina guo wrote:

> Thank you very much for your detailed reply.
>
> We want to get this output "cat /etc/sysconfig/network/virtualip". So 
> which collectors may contain this value?
>
> On Wednesday, September 8, 2021 at 6:26:45 PM UTC+8 Brian Candler wrote:
>
>> On Wednesday, 8 September 2021 at 10:00:42 UTC+1 ninag...@gmail.com 
>> wrote:
>>
>>> May I know if  there is an example for how to write this cronjob?
>>>
>>
>> There are lots of examples in this repo:
>>
>> https://github.com/prometheus-community/node-exporter-textfile-collector-scripts
>>  
>> Basically you just write out metrics in the prometheus text-based 
>> exposition format 
>> <https://prometheus.io/docs/instrumenting/exposition_formats/> to a text 
>> file, and enable the node_exporter textfile collector 
>> <https://github.com/prometheus/node_exporter#textfile-collector> to read 
>> it.
>>
>> > With node exporter, whether we can obtain the info of virtual IP?
>>
>> I don't know, because you haven't said what sort of virtual IPs you're 
>> using, except for some CLI tool "virtualip list" which I've never seen 
>> before.
>>
>> You can look at the list of node_exporter collectors which are enabled 
>> by default 
>> <https://github.com/prometheus/node_exporter#enabled-by-default> and 
>> disabled 
>> by default 
>> <https://github.com/prometheus/node_exporter#disabled-by-default> - 
>> maybe there's one which meets your needs.  For example, if you're using 
>> IPVS then I see some metrics for that.  If you're using keepalived, then it 
>> exports its status via SNMP.  (You would run snmpd on that host, and 
>> snmp_exporter on your prometheus server).
>>
>> > One more question is with node_uname_info, we get the nodename, this 
>> nodename is the hostname of the server by default?
>>
>> I believe it's whatever "uname -n" or "hostname" shows.
>>
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/5e92b00e-9ac4-49e3-b6ad-178b010ee0a3n%40googlegroups.com.

Reply via email to