Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MAVSDREW
Frequent Visitor

Error connecting to Zabbix API in PBI Online (Unable to connect to the remote server)

Hello, I need help if someone has already worked with the subject below:

 

I am working on reports with Zabbix data through Microsoft Power BI.

Data access is through the Zabbix API, with reference to version 4.0.

Through Power BI Desktop I did the extraction and transformation of the data and thus the preparation of my reports.

A report was published on the Power BI online service.

And within the online service I am trying to use the feature for scheduled (scheduled) update and here my problems begin.

Doing several online searches and with several attempts I cannot connect my data set on the online service to Zabbix.

 

For this, I will pass on some data to better visualize the problem. Created a report on Power Bi Desktop for testing and demonstration with the following data sources:

  • user_login: Using a JSON source and using the API / ZABBIX method user.login I get a token as a result.

 

 

 

let
    Body = "{
        ""jsonrpc"": ""2.0"",
        ""method"": ""user.login"",
        ""params"": {
            ""user"":""USER_ZABBIX"",
            ""password"":""PASSWORD_ZABBIX""
        },
        ""auth"": null,
        ""id"": 1
    }",
    Source = Json.Document (
        Web.Contents(
            "SERVER_ZABBIX/api_jsonrpc.php",
            [
                Headers=[
                    #"Content-Type"="application/json"
                ],
                Content = Text.ToBinary(Body)
            ]
        )
    ),
    result = Source[result]
in
    result

 

 

 

  • hosts: Using a JSON source and using the API / ZABBIX method host.get I get the data from hosts as a result of the example of groupsids (103) [host group with ID 103].

 

 

 

let
    Body =
    "{
        ""jsonrpc"": ""2.0"",
        ""method"": ""host.get"",
        ""params"": {
            ""groupids"":""103""
        },
        ""auth"": ""TOKEN"",
        ""id"": 1
    }",
    Source = Json.Document(
        Web.Contents(
            "SERVER_ZABBIX/api_jsonrpc.php",
            [
                Headers=[
                    #"Content-Type"="application/json"
                ],
                Content = Text.ToBinary(Body)
            ]
        )
    )
in
    Source

 

 

 

From the last code above, I have a list with the data of the hosts and which I turn into a table for the preparation of the report.

The report is published on the Power BI online service.

However in the online service when the data update is performed, I have the following error:

 

 

 

 

Data source error: {"error":{"code":"ModelRefresh_ShortMessage_ProcessingError","pbi.error":{"code":"ModelRefresh_ShortMessage_ProcessingError","parameters":{},"details":[{"code":"Message","detail":{"type":1,"value":"Unable to connect to the remote server"}}],"exceptionCulprit":1}}} Table: hosts.

 

 

 

 

I made several attempts to change Web.Contents, using references:

Other references were also used, where I tried to change the Headers of Web.Contents, using RelativePath but I couldn't really get a successful connection. Someone would know how to help me with my problem. Hugs.

2 ACCEPTED SOLUTIONS
MAVSDREW
Frequent Visitor

Problem solved. I connected to my gateway.

View solution in original post

Well, there were other problems, such as pre-condition failures.

 

I believed that my data source did not need the gateway because it is web, but after solving small errors I managed to solve the connection problem using the local gateway.

 

With the local gateway, access to my network was ok.

View solution in original post

12 REPLIES 12
MAVSDREW
Frequent Visitor

Problem solved. I connected to my gateway.

Glad you got it solved.  Just curious if you could provide a little more detail on what you did to solve the problem.  Do you mean you went through your on-premise data gateway?

 

Thanks,

Well, there were other problems, such as pre-condition failures.

 

I believed that my data source did not need the gateway because it is web, but after solving small errors I managed to solve the connection problem using the local gateway.

 

With the local gateway, access to my network was ok.

Would you please provide more detail info how to fix it? Thanks

@FiveZhuo

I don't remember very well. But in my case, I think I needed to configure my data sources in Power BI Online.

What is your current error?

Also, what might help you, read the instructions at this link:
https://medium.com/zabbix-brasil/zabbix-api-integration-power-bi-67772fd9ad26

Thanks your feedback !

My problem is can't connect datasoure in power bi online. it'work fine in power bi desktop. would you let me know how to connect on-premises gateway or personal gateway? i try to open this link https://medium.com/zabbix-brasil/zabbix-api-integration-power-bi-67772fd9ad26, but it failed.

FiveZhuo_0-1699926197444.png

 

@FiveZhuo , Hi.

 

Strange, the link is ok for me.

 

https://medium.com/zabbix-brasil/zabbix-api-integration-power-bi-67772fd9ad26

 

When connecting to Zabbix, are you pointing to the correct link for your Zabbix service?

 

Example of what your font should look like:

Web{"url":"https://my-address-zabbix/api_jsonrpc.php"}

 

Hugs.

 

Yes, i have pointed the correct zabbix server link. it worked fine in powe bi desktop.  and i can open the link your provided. i did it same as that article.

FiveZhuo_0-1700201973953.png

 

Ok, but if the error continues to be with the figure, apparently it is a credential error, I wouldn't know what else to tell you.

My connection is established like this:

 

zabbix.png

is it personal gateway? i failed with 412 error by persional gateway.

FiveZhuo_0-1701076709634.png

 

Hey,

You would have to evaluate the details of the error.

I use the standard mode gateway on a server dedicated to this.

Note: This better validates the privacy level of your data source.

Greg_Deckler
Super User
Super User

@ImkeF @edhans 


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors