Would node_exporter supports to unix like hp-ux or aix?

1,259 views
Skip to first unread message

wmg1575...@gmail.com

unread,
Sep 18, 2018, 10:32:06 PM9/18/18
to Prometheus Users
I wanna monitoring the hp-ux and aix, 
In node_exporter's readme file, it saids, "Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors."
So, i thought maybe node_exporter can exposed metrics for unix like hp-ux and aix, did someone try it before?Did it work?
Thank you.

Ben Kochie

unread,
Sep 19, 2018, 2:19:59 AM9/19/18
to wmg1575...@gmail.com, Prometheus Users
Because we use Go, we're dependent on upstream support for various platforms.

I don't see much in the way of PA-RISC support, but it seems like AIX / power could be supported via gccgo[0]. And sometime in the future it may be supported natively[1].

We don't have access to any HP or AIX systems to test and run our CI pipelines with This makes it difficult for us to add this to our build system, promu[2].

If you know anyone at HP or IBM that can donate compute hours, we might be able to support this more fully.


--
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-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8fca5c85-b9e8-4831-864d-051736e62e4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sull.l...@gmail.com

unread,
Oct 8, 2018, 9:37:14 AM10/8/18
to Prometheus Users
Hi Ben,

We have some aix systems too.
We tried to compil node_exporter on an AIX 7.2 but it failed.

For this, we have installed yum (and its dependencies), gcc-go version gccgo go1.10 (GCC) 8.1.0 aix / ppc (and its dependencies) and git version 2.8.1 (and its dependencies).


We retrieved the directory to compile the node_exporter 0.16.0.


We encountered the following errors:

 

- an error when downloading sources by go get :

 

# github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus

vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go:15:19: error: reference to undefined identifier 'terminal.IsTerminal'

   return terminal.IsTerminal(int(v.Fd()))

   

- an error while trying to compile :

 

# make

"Makefile.common", line 26: make: Dependency line needs colon or double colon operator.

"Makefile.common", line 28: make: Dependency line needs colon or double colon operator.

"Makefile.common", line 29: make: Dependency line needs colon or double colon operator.

 



Do you have any idea about how should we do ?



bye



Ben Kochie

unread,
Oct 8, 2018, 10:01:04 AM10/8/18
to Ptitlusone, Prometheus Users
Are you using GNU make? or cmake?

--
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-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

jerome....@maif.fr

unread,
Oct 10, 2018, 4:04:35 AM10/10/18
to Prometheus Users
Hi Ben,

we have installed gnu make.
we redid the go get:

# export PATH=$PATH:/opt/freeware/bin/
# export GOPATH=/data/go
   return terminal.IsTerminal(int(v.Fd()))


we positioned ourselves on version 0.15.2 :
[root@samaq024] /data/go/src/github.com/prometheus/node_exporter
# git checkout v0.15.2

[root@samaq024] /data/go/src/github.com/prometheus/node_exporter
# cat VERSION
0.15.2


we compile now with gnu make :
[root@samaq024] /data/go/src/github.com/prometheus/node_exporter
# /opt/freeware/bin/make --version
GNU Make 4.2.1
Built for powerpc-ibm-aix6.1.9.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


[root@samaq024] /data/go/src/github.com/prometheus/node_exporter
# /opt/freeware/bin/make
>> formatting code
>> vetting code
vendor/github.com/sirupsen/logrus/text_formatter.go:75:19: error: reference to undefined identifier 'terminal.IsTerminal'
   return terminal.IsTerminal(int(v.Fd()))
                   ^
make: *** [Makefile:98: vet] Error 2

Do you have an idea of ​​the cause of the error ?

Bye.

Ben Kochie

unread,
Oct 10, 2018, 5:07:53 AM10/10/18
to jerome....@maif.fr, Prometheus Users
Sorry, I don't know what is causing the error.

Christian Hoffmann

unread,
Oct 10, 2018, 3:07:48 PM10/10/18
to jerome....@maif.fr, Prometheus Users
On 10/10/18 10:04 AM, jerome....@maif.fr wrote:
> # go get github.com/prometheus/node_exporter
> # github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus
> src/github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go:15:19:
> error: reference to undefined identifier 'terminal.IsTerminal'
>    return terminal.IsTerminal(int(v.Fd()))

I suspect that this may be related to the third-party library
sirupsen/logrus using golang.org/x/crypto/ssh/terminal, which does not
seem to support the IsTerminal() function on AIX.

https://github.com/prometheus/node_exporter/blob/5273b00df949ddbb051e48c3b21d0cd01f6e728d/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go#L9

The crypto code is configured not to be built on AIX:
https://github.com/golang/crypto/blob/master/ssh/terminal/util.go#L5

A quick and dirty hack for trying to get further in the build process
would be to use the stub code for AppEngine instead, which does not rely
on the crypto library.
This could be accomplished by running
cp
src/github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
src/github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go

in your checkout.

The real fix would probably be to either include this workaround in the
logrus library (would have to be discussed in the logrus project) if
considered viable or to contribute/request proper AIX support to the
crypto library's terminal package.

In other words, there may still be development work to be done.

> [root@samaq024] /data/go/src/github.com/prometheus/node_exporter
> # /opt/freeware/bin/make
>>> formatting code
>>> vetting code
This looks ok now.

Christian Hoffmann

unread,
Oct 10, 2018, 3:10:13 PM10/10/18
to jerome....@maif.fr, Prometheus Users
On 10/10/18 9:07 PM, Christian Hoffmann wrote:
> A quick and dirty hack for trying to get further in the build process
> would be to use the stub code for AppEngine instead, which does not rely
> on the crypto library.
> This could be accomplished by running
> cp
> src/github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
> src/github.com/prometheus/node_exporter/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
>
> in your checkout.

Correction: In addition to overwriting the notappengine file, you would
have to remove the build tags line:
https://github.com/prometheus/node_exporter/blob/master/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go#L1

sull.l...@gmail.com

unread,
Oct 11, 2018, 4:43:34 AM10/11/18
to Prometheus Users
Hi Christian,

Thanks a lot,but it's still in error.


And after a make, always the same error.

I didn't understand where the build tag would be remove ?

Do you think or do you know if it's possible to build node_exporter for aix ?
Someone already dit it ?


sull.l...@gmail.com

unread,
Oct 11, 2018, 4:59:13 AM10/11/18
to Prometheus Users
Sorry, i think i got it, i delete the line 1 from terminal_check_appengine.go file and after a failed from terminal_check_notappengine.go too.

It's still down but with another reason.

[root@samaq024] /data/go/src/github.com/prometheus/node_exporter
# /opt/freeware/bin/make
>> formatting code
>> vetting code
vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go:7:1: error: redefinition of 'checkIfTerminal'
 func checkIfTerminal(w io.Writer) bool {
 ^
vendor/github.com/sirupsen/logrus/terminal_check_appengine.go:7:1: note: previous definition of 'checkIfTerminal' was here
 func checkIfTerminal(w io.Writer) bool {
 ^
vendor/github.com/sirupsen/logrus/text_formatter.go:75:19: error: reference to undefined identifier 'terminal.IsTerminal'
   return terminal.IsTerminal(int(v.Fd()))

l.mi...@gmail.com

unread,
Oct 11, 2018, 5:46:35 AM10/11/18
to Prometheus Users
You might want to try logrus 1.1.1:
https://github.com/sirupsen/logrus/releases/tag/v1.1.1

I had some issues with logrus cross-compilation recently due to changes in those terminal files and it got fixed with 1.1.1 (https://github.com/sirupsen/logrus/issues/836), if it's still an issue for you with latest logrus I suggest to open a ticket on https://github.com/sirupsen/logrus

Ben Kochie

unread,
Oct 11, 2018, 8:01:16 AM10/11/18
to Łukasz Mierzwa, Prometheus Users
Oh, that should be easy to push to our vendoring.


--
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-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

sull.l...@gmail.com

unread,
Oct 11, 2018, 10:31:20 AM10/11/18
to Prometheus Users
It's still down !


If someone have an idea  ??
I am "preneur" :)

sull.l...@gmail.com

unread,
Oct 15, 2018, 10:55:37 AM10/15/18
to Prometheus Users
Hi everybody,

Logrus give us a fix for our issue.
But it's sadly KO!

The next step of our compil:

root@samaq024] /data/go/src/github.com/prometheus/node_exporter
# /opt/freeware/bin/make

checking code style
vetting code

# github.com/prometheus/node_exporter

./node_exporter.go:22:2: could not import github.com/prometheus/client_golang/prometheus (unrecognized magic string: "<big")
./node_exporter.go:23:2: could not import github.com/prometheus/client_golang/prometheus/promhttp (unrecognized magic string: "<big")
./node_exporter.go:24:2: could not import github.com/prometheus/common/log (unrecognized magic string: "<big")
./node_exporter.go:25:2: could not import github.com/prometheus/common/version (unrecognized magic string: "<big")
./node_exporter.go:26:2: could not import github.com/prometheus/node_exporter/collector (unrecognized magic string: "<big")
./node_exporter.go:27:2: could not import gopkg.in/alecthomas/kingpin.v2 (unrecognized magic string: "<big")
./node_exporter_test.go:13:2: could not import github.com/prometheus/procfs (unrecognized magic string: "<big")
./node_exporter.go:73:19: undeclared name: kingpin
./node_exporter.go:74:19: undeclared name: kingpin
./node_exporter.go:77:15: undeclared name: kingpin
./node_exporter.go:78:2: undeclared name: kingpin
./node_exporter.go:79:2: undeclared name: kingpin
./node_exporter.go:80:2: undeclared name: kingpin
./node_exporter.go:92:17: cannot range over nc.Collectors (invalid operand)
./node_exporter.go:27:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
vet: typecheck failures
# github.com/prometheus/node_exporter/collector
collector/buddyinfo.go:23:2: could not import github.com/prometheus/client_golang/prometheus (unrecognized magic string: "<big")
collector/buddyinfo.go:24:2: could not import github.com/prometheus/common/log (unrecognized magic string: "<big")
collector/buddyinfo.go:25:2: could not import github.com/prometheus/procfs (unrecognized magic string: "<big")
collector/collector.go:24:2: could not import gopkg.in/alecthomas/kingpin.v2 (unrecognized magic string: "<big")
collector/ntp.go:23:2: could not import github.com/beevik/ntp (unrecognized magic string: "<big")
collector/runit.go:21:2: could not import github.com/soundcloud/go-runit/runit (unrecognized magic string: "<big")
collector/supervisord.go:19:2: could not import github.com/kolo/xmlrpc (unrecognized magic string: "<big")
collector/textfile.go:28:6: could not import github.com/prometheus/client_model/go (unrecognized magic string: "<big")
collector/textfile.go:29:2: could not import github.com/prometheus/common/expfmt (unrecognized magic string: "<big")
collector/textfile_test.go:24:2: could not import github.com/prometheus/client_golang/prometheus/promhttp (unrecognized magic string: "<big")
collector/ntp.go:34:23: undeclared name: kingpin
collector/ntp.go:35:23: undeclared name: kingpin
collector/ntp.go:36:23: undeclared name: kingpin
collector/ntp.go:37:23: undeclared name: kingpin
collector/ntp.go:40:23: undeclared name: kingpin
collector/ntp.go:41:23: undeclared name: kingpin
collector/paths.go:25:13: undeclared name: kingpin
collector/paths.go:26:13: undeclared name: kingpin
collector/runit.go:25:23: undeclared name: kingpin
collector/supervisord.go:26:19: undeclared name: kingpin
collector/buddyinfo.go:64:24: cannot range over buddyInfo (invalid operand)
collector/buddyinfo.go:65:28: cannot range over entry.Sizes (invalid operand)
collector/collector.go:67:10: undeclared name: kingpin
collector/runit.go:73:26: cannot range over services (invalid operand)
collector/supervisord.go:115:12: invalid operation: c.client (variable of type *invalid type) has no field or method Call
collector/textfile.go:216:22: cannot range over parsedFamilies (invalid operand)
collector/textfile.go:217:22: cannot range over mf.Metric (invalid operand)
collector/textfile.go:234:22: cannot range over parsedFamilies (invalid operand)
collector/textfile.go:68:25: invalid operation: metricFamily (variable of type *invalid type) has no field or method Metric
collector/textfile.go:68:25: cannot range over metricFamily.Metric (invalid operand)
collector/textfile.go:70:25: cannot range over labels (invalid operand)
collector/textfile.go:77:25: invalid operation: metricFamily (variable of type *invalid type) has no field or method Metric
collector/textfile.go:77:25: cannot range over metricFamily.Metric (invalid operand)
collector/textfile.go:85:25: cannot range over labels (invalid operand)
collector/textfile.go:104:17: invalid operation: metricFamily (variable of type *invalid type) has no field or method GetType
collector/textfile.go:120:22: cannot range over metric.Summary.Quantile (invalid operand)
collector/textfile.go:125:7: invalid operation: metricFamily (variable of type *invalid type) has no field or method Name
collector/textfile.go:126:6: invalid operation: metricFamily (variable of type *invalid type) has no field or method GetHelp
collector/textfile.go:135:22: cannot range over metric.Histogram.Bucket (invalid operand)
collector/textfile.go:140:7: invalid operation: metricFamily (variable of type *invalid type) has no field or method Name
collector/textfile.go:141:6: invalid operation: metricFamily (variable of type *invalid type) has no field or method GetHelp
collector/textfile.go:154:7: invalid operation: metricFamily (variable of type *invalid type) has no field or method Name
collector/textfile.go:155:6: invalid operation: metricFamily (variable of type *invalid type) has no field or method GetHelp
collector/paths_test.go:24:15: undeclared name: kingpin
collector/paths_test.go:38:15: undeclared name: kingpin
collector/paths_test.go:52:15: undeclared name: kingpin
collector/paths_test.go:66:15: undeclared name: kingpin
collector/collector.go:24:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
collector/ntp.go:25:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
collector/paths.go:20:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
collector/runit.go:22:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
collector/supervisord.go:22:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
collector/paths_test.go:20:2: "gopkg.in/alecthomas/kingpin.v2" imported but not used
vet: typecheck failures
make: *** [Makefile:116: vet] Error 2
...


 Finaly, i'm not sure node_exporter can be build for AIX system.

Il you think different, il am "toujours preneur" :)

Bye
Reply all
Reply to author
Forward
0 new messages