Instana U

 View Only
  • 1.  Endpoint to get healt for websites

    Posted Fri March 29, 2024 09:06 PM

    Hello all,

    I'm trying to GET the value/status "Health" (screenshot below) below using Instana API, but couldn't find anything about it in the API docs.

    is there any way to get either directly or calculate it using some mix of endpoints?

    Thanks in advance.



    ------------------------------
    Chaymae Hammouti
    ------------------------------


  • 2.  RE: Endpoint to get healt for websites

    Posted Tue April 02, 2024 01:21 PM

    Dear Mr. Hammouti,
    Instana Openapi is published at https://github.com/instana/openapi and on GitHub Pages https://instana.github.io/openapi/.
    The heath state can be queried though the API described at https://instana.github.io/openapi/#operation/getHealthState.
    To produce an API token for the query, go to INSTANA UI, Settings->Access Control->API Tokens-> click on "New Token"

    You can check that the combination of token and backend URL works with:
    INSTANA_API_URL=<instana_ui_base_url>/api Example: "https://qa-instana.instana.io/api"
    INSTANA_API_TOKEN=<your token>
    curl -v --request GET --show-error --header "Authorization: apiToken ${INSTANA_API_TOKEN}" --url "${INSTANA_API_URL}/instana/version"

    The output of the command will show the debug of the connections and at the end it will show Instana version. for example:
    {"branch":"release-269","commit":"a8adc214b61949a832b3f79294f8879baee9477b","imageTag":"3.269.339-0"}

    Naturally, you can choose wget in place of curl of another utilities, too.

    If the above works, the following must work too:
    curl -v --request GET --show-error --header "Authorization: apiToken ${INSTANA_API_TOKEN}" --url "${INSTANA_API_URL}/instana/health"
    And hopefully it will prompt: "{"health":"GREEN","messages":[]}" 

    I hope it helps.

    My Warmest Regards, 
     
    Teresa Noviello
    Senior Software Engineer, Team Proxies and Kernel Instrumentation, Instana - IBM
    Instana Engineering Team
     
    IBM Corporation
    c/o Instana
    71 S Wacker Drive, 7th floor
    Chicago, IL 60606
     
    Senior Software Engineer, Team Proxies and Kernel Instrumentation, Instana - IBM
    Instana Engineering Team
     
    IBM Corporation
    c/o Instana
    71 S Wacker Drive, 7th floor
    Chicago, IL 60606


    ------------------------------
    Teresa Noviello
    ------------------------------



  • 3.  RE: Endpoint to get healt for websites

    Posted Tue April 02, 2024 01:21 PM

    For the reviewers:
    My previous answer was to retrieve the Instana HEALTH.
    For website monitoring, I have checked and I guess the most appropriate API is //api/website-monitoring/v2/metrics.
    In any case, my previous answer was too generic.
    Let's hope some body from Instana UI can help better on this question.



    ------------------------------
    Teresa Noviello
    ------------------------------