IBM Cloud Monitoring - Viewing Custom Metrics in Grafana











up vote
0
down vote

favorite












I'm pushing custom metrics to IBM monitoring using the REST API.
That seems to work because querying the data returns it (see below).
However, whatever metric I try to configure in Grafana, the visualization always comes up empty with "no datapoints".



How should I address the custom metric in Grafana?



POST https://metrics.ng.bluemix.net/v1/metrics

[
{
"name":"test_metric",
"value":80,
"timestamp":1541866045
}
]

GET https://metrics.ng.bluemix.net/v1/metrics?target=*&from=1541865900&to=now

[
{
"target": "test_metric",
"datapoints": [
[
100,
1541865930
],
[
30,
1541865960
],
[
30,
1541865990
],
[
80,
1541866020
],
[
null,
1541866050
],
[
null,
1541866080
]
]
}
]









share|improve this question
























  • Hope you have configured a metric query in Grafana. If not follow the instructions mentioned here
    – Vidyasagar Machupalli
    Nov 13 at 9:46















up vote
0
down vote

favorite












I'm pushing custom metrics to IBM monitoring using the REST API.
That seems to work because querying the data returns it (see below).
However, whatever metric I try to configure in Grafana, the visualization always comes up empty with "no datapoints".



How should I address the custom metric in Grafana?



POST https://metrics.ng.bluemix.net/v1/metrics

[
{
"name":"test_metric",
"value":80,
"timestamp":1541866045
}
]

GET https://metrics.ng.bluemix.net/v1/metrics?target=*&from=1541865900&to=now

[
{
"target": "test_metric",
"datapoints": [
[
100,
1541865930
],
[
30,
1541865960
],
[
30,
1541865990
],
[
80,
1541866020
],
[
null,
1541866050
],
[
null,
1541866080
]
]
}
]









share|improve this question
























  • Hope you have configured a metric query in Grafana. If not follow the instructions mentioned here
    – Vidyasagar Machupalli
    Nov 13 at 9:46













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm pushing custom metrics to IBM monitoring using the REST API.
That seems to work because querying the data returns it (see below).
However, whatever metric I try to configure in Grafana, the visualization always comes up empty with "no datapoints".



How should I address the custom metric in Grafana?



POST https://metrics.ng.bluemix.net/v1/metrics

[
{
"name":"test_metric",
"value":80,
"timestamp":1541866045
}
]

GET https://metrics.ng.bluemix.net/v1/metrics?target=*&from=1541865900&to=now

[
{
"target": "test_metric",
"datapoints": [
[
100,
1541865930
],
[
30,
1541865960
],
[
30,
1541865990
],
[
80,
1541866020
],
[
null,
1541866050
],
[
null,
1541866080
]
]
}
]









share|improve this question















I'm pushing custom metrics to IBM monitoring using the REST API.
That seems to work because querying the data returns it (see below).
However, whatever metric I try to configure in Grafana, the visualization always comes up empty with "no datapoints".



How should I address the custom metric in Grafana?



POST https://metrics.ng.bluemix.net/v1/metrics

[
{
"name":"test_metric",
"value":80,
"timestamp":1541866045
}
]

GET https://metrics.ng.bluemix.net/v1/metrics?target=*&from=1541865900&to=now

[
{
"target": "test_metric",
"datapoints": [
[
100,
1541865930
],
[
30,
1541865960
],
[
30,
1541865990
],
[
80,
1541866020
],
[
null,
1541866050
],
[
null,
1541866080
]
]
}
]






ibm-cloud grafana ibm-cloud-monitoring






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 at 9:27









oɔɯǝɹ

4,93254759




4,93254759










asked Nov 10 at 16:37









Oren

386214




386214












  • Hope you have configured a metric query in Grafana. If not follow the instructions mentioned here
    – Vidyasagar Machupalli
    Nov 13 at 9:46


















  • Hope you have configured a metric query in Grafana. If not follow the instructions mentioned here
    – Vidyasagar Machupalli
    Nov 13 at 9:46
















Hope you have configured a metric query in Grafana. If not follow the instructions mentioned here
– Vidyasagar Machupalli
Nov 13 at 9:46




Hope you have configured a metric query in Grafana. If not follow the instructions mentioned here
– Vidyasagar Machupalli
Nov 13 at 9:46












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Apparently I had to add the header X-Auth-Scope-Id to make sure that Grafana was looking at the right datasource. Although it's technically an optional header (and stated as optional in the documentation), if you don't specify it then IBM's default settings in its hosted Grafana will not find the data, unless you explicitly change the view to the "account" scope. Thanks to everyone who took at look at this.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241066%2fibm-cloud-monitoring-viewing-custom-metrics-in-grafana%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Apparently I had to add the header X-Auth-Scope-Id to make sure that Grafana was looking at the right datasource. Although it's technically an optional header (and stated as optional in the documentation), if you don't specify it then IBM's default settings in its hosted Grafana will not find the data, unless you explicitly change the view to the "account" scope. Thanks to everyone who took at look at this.






    share|improve this answer

























      up vote
      0
      down vote













      Apparently I had to add the header X-Auth-Scope-Id to make sure that Grafana was looking at the right datasource. Although it's technically an optional header (and stated as optional in the documentation), if you don't specify it then IBM's default settings in its hosted Grafana will not find the data, unless you explicitly change the view to the "account" scope. Thanks to everyone who took at look at this.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Apparently I had to add the header X-Auth-Scope-Id to make sure that Grafana was looking at the right datasource. Although it's technically an optional header (and stated as optional in the documentation), if you don't specify it then IBM's default settings in its hosted Grafana will not find the data, unless you explicitly change the view to the "account" scope. Thanks to everyone who took at look at this.






        share|improve this answer












        Apparently I had to add the header X-Auth-Scope-Id to make sure that Grafana was looking at the right datasource. Although it's technically an optional header (and stated as optional in the documentation), if you don't specify it then IBM's default settings in its hosted Grafana will not find the data, unless you explicitly change the view to the "account" scope. Thanks to everyone who took at look at this.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 at 10:13









        Oren

        386214




        386214






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241066%2fibm-cloud-monitoring-viewing-custom-metrics-in-grafana%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Danny Elfman

            Lugert, Oklahoma