Giter Club home page Giter Club logo

Comments (10)

ibmmqmet avatar ibmmqmet commented on May 27, 2024

Why have you set CGO_ENABLED=0? That will disable the C compiler.

from mq-metric-samples.

karthickraj19 avatar karthickraj19 commented on May 27, 2024

Ok, Is C compiler mandate for Linux? If yes, I will add the executable and set the path and will try again.
I was get the below error so disabled it.

ERROR : exec: "gcc": executable file not found in $PATH in Linux

So,if I add the c compiler both the error will be fixed?

from mq-metric-samples.

ibmmqmet avatar ibmmqmet commented on May 27, 2024

Since it's using cgo, then yes you need a C compiler installed.

from mq-metric-samples.

karthickraj19 avatar karthickraj19 commented on May 27, 2024

This worked and thank for the quick turnaround.
I have one more common questions, I see there are many metrics this exporter generates.

Can we specifically limit the number of metrics by selecting only the metrics which i want.

And for example if I say I need only the below mentioned metrics type,can we filter that on an exporter level?

TYPE ibmmq_qmgr_channel_initiator_status gauge
TYPE ibmmq_qmgr_command_server_status gauge
TYPE ibmmq_qmgr_connection_count gauge
TYPE ibmmq_qmgr_exporter_publications gauge
TYPE ibmmq_qmgr_uptime gauge
TYPE ibmmq_queue_attribute_max_depth gauge
TYPE ibmmq_queue_attribute_usage gauge
TYPE ibmmq_queue_input_handles gauge
TYPE ibmmq_queue_oldest_message_age gauge
TYPE ibmmq_queue_output_handles gauge
TYPE ibmmq_queue_qtime_long gauge
TYPE ibmmq_queue_qtime_short gauge
TYPE ibmmq_queue_time_since_get gauge
TYPE ibmmq_queue_time_since_put gauge

from mq-metric-samples.

ibmmqmet avatar ibmmqmet commented on May 27, 2024

There is a limited ability to filter some of the queue-based metrics (see the queueSubscriptionSelector configuration flag) but that filter will not influence any of the items you have listed. Everything gets collected and then you filter in your dashboards and queries as to which items are of interest to you.

from mq-metric-samples.

vlucian avatar vlucian commented on May 27, 2024

hi. I have a similar issue. I'm able to compile it on Linux for Linux but trying to compile it on Linux for Windows doesn't work and produces the same errors as the ones above. For Linux compilation I'm using the Linux redistributable while for Windows I'm using the Windows redistributable with options GOOS=windows GOARCH=amd64. I also played with CGO_CFLAGS and CGO_LDFLAGS and in the end, I tried with a dirty trick: I copied the content of bin64 into lib64 and also from tools/c/include directly into inc. I'm using /opt/mqm as MQ_INSTALLATION_PATH (as my understanding is /opt/mqm/lib64 and /opt/mqm/inc are the default locations for libs and include files). However no matter what I tried I got the same error...I feel I'm missing something.

from mq-metric-samples.

ibmmqmet avatar ibmmqmet commented on May 27, 2024

One way of trying to cross-compile Go code, especially for such different platforms as Linux->Windows, is explained here I've no idea whether that would work for the MQ packages, but it will give an idea of the complexity in trying to do it. It's not something I'd want to spend time on...I'd rather spin up virtual machines or containers (depending on my preferred "host" OS) and build in those as if it's native.

from mq-metric-samples.

vlucian avatar vlucian commented on May 27, 2024

I did it for windows exporter: I compiled it on Linux. For MQ I feel it's a bit more complex because of the prerequisites and I was thinking someone might have "the recipe". Anyway, I'm in Azure devops and I'm not sure how is easy is to get a gcc compiler into a windows image (by default I think there's MS visual C++)

from mq-metric-samples.

ibmmqmet avatar ibmmqmet commented on May 27, 2024

The post I linked to shows how you can get containers that have all the pieces needed to run a windows-compatible compiler. And shows building against native code. It looks plausible as a solution, even if you'd have to adapt it a bit for the MQ dependencies instead of the remoteAudio that they show.

from mq-metric-samples.

vlucian avatar vlucian commented on May 27, 2024

In the end it worked by using gcc-mingw-w64.
so:
curl https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.2.0.1-IBM-MQC-Redist-Win64.zip -o /tmp/9.2.0.1-IBM-MQC-Redist-Win64.zip
unzip /tmp/9.2.0.1-IBM-MQC-Redist-Win64.zip -d /opt/mqm
sudo apt-get install gcc-multilib
sudo apt-get install gcc-mingw-w64
and then:
CGO_LDFLAGS: -L/opt/mqm/bin64 -lmqm
CGO_CFLAGS: -I/opt/mqm/tools/c/include/ -D_WIN64
CXX_FOR_TARGET: x86_64-w64-mingw32-g++
CXX: x86_64-w64-mingw32-g++
CC_FOR_TARGET: x86_64-w64-mingw32-gcc
CC: x86_64-w64-mingw32-gcc

I hope this will help others.

from mq-metric-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.