xperimental/nextcloud-exporter

Unable to fetch information from Nextcloud server

LogiEx7 opened this issue · 8 comments

Hello,
I think i have the same issue like #12. I think the problems comes from nextcloud_up 0.
I do not know why I am returned 0 when the nextcloud server is working perfectly...

Hi @LogiEx7,

nextcloud_up will be set to 0 when the exporter is not able to fetch the information from the Nextcloud instance. It should print some error message (not in the HTTP response but in the output of the exporter process) telling you more details though.

Can you please post the error message here so that we can see what the issue is?

Ok, the problem comes from the fact that I bind port 9205 to localhost and used a proxy with a different domain. Can i do some changes for use a proxy with another domain for the metrics pages?

With the Nextcloud domain i have this error : context deadline exceeded (Client.Timeout exceeded while awaiting headers)

I'm sorry, but I'm not sure what the issue here is. Can you please be a bit more specific on where the nextcloud-exporter is running relative to the Nextcloud server or perhaps post your configuration for the exporter (without password, of course)?

Nextcloud also has a concept of "trusted domains", ideally you have configured the exporter to use the same domain as a normal user would or you will have to add the hostname that the exporter is using to the trusted domains configuration in Nextcloud's configuration file.

@LogiEx7 Any update on this? Did you find the fix for your issue already and want to share it for others?

Closed because of inactivity. Please still use for comments if there's a similar issue.

@LogiEx7 try to increase NEXTCLOUD_TIMEOUT variable. May be 5s are not enough to get the response from nextcloud due some network stucks. I also have the same problem, the same error and noticed, that it takes time to open page /ocs/v2.php/apps/serverinfo/api/v1/info. The XML on this page is not static and generates per each request. That's why increasing of timeout can help you.

Hello!

I have some problem with nextcloud-exporter. Maybe someone had this issue and solves it?!

root@NC-V3:~/nextcloud-exporter# nextcloud-exporter --config-file nextcloud-exporter.yaml
INFO nextcloud-exporter 0.3.0
INFO Nextcloud server: http://192.168.100.138 User: nextclouduser
INFO Listen on :9205...
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO Error during scrape: Get "http://192.168.100.138/ocs/v2.php/apps/serverinfo/api/v1/info": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

@olegsidokhmetov This looks like a connectivity issue between the machine the exporter is running on and the Nextcloud server. Can NC-V3 reach the IP of the Nextcloud server that you configured (192.168.100.138)? For example, what happens when you try to use curl to fetch the URL that the exporter tries to get?