> We want to get this output "cat /etc/sysconfig/network/virtualip". So which collectors may contain this value?
I am unaware of any. That looks like a RedHat-specific config file.
Remember that prometheus collects *metrics* which are floating point numbers only. Anything which is not in that format has to appear in the label of a metric, and the unique set of labels defines a new timeseries. If you don't need any floating-point value for a metric, then the convention is to return a static value of "1" which makes it easy to combine with other metrics, using the multiplication operator. node_uname_info is a very good example of this, as are others like node_exporter_build_info and node_network_info.
If you show us what the content of this file looks like, maybe we can suggest what a suitable metric would look like.
> 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?
You can see all of the metrics returned by node_exporter using this command:
curl localhost:9100/metrics
I can see metrics giving layer 2 info (MAC addresses):
node_network_info{address="0a:4e:86:6c:ab:ed",broadcast="ff:ff:ff:ff:ff:ff",device="veth6698c6af",duplex="full",ifalias="",operstate="up"} 1
- there is more info
here - but none giving layer 3 info (IP addresses). Either this is available in an optional node_exporter collector which is disabled by default - I pointed you to the documentation on those before - or you'd need to create a new metric yourself (e.g. with textfile collector), or find another exporter that does what you want.
> So we only want to get a specific static value to be shown on Grafana, it may not be a generanl metric.
Everything in prometheus is a metric. Static values have to be labels on metrics. Again, see how node_uname_info does this.
Of course, since Grafana is a separate piece of software, it might be possible in Grafana to extract information from some other source and combine it with other info in your dashboard. I don't know how you'd do that, and you'd have to ask elsewhere, because this is a mailing list for prometheus, not grafana. (Grafana has its own discussion forum).