Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.38k stars 1.06k forks source link

LibreNMS Integration broken as API that the LIbreNMS points too does not exist in graylog #20787

Open davidshirk80 opened 1 day ago

davidshirk80 commented 1 day ago

Issue: The newest LibreNMS release cannot connect to graylog. The LibreNMS app/ApiClients/GraylogApi.php points to the $uri = $this->api_prefix . '/search/universal/relative' on the graylog server. From everything I can see in Graylog, this is not a valid API to point to when integration the two.

Expected Behavior

Graylog integrates with LibreNMS like it used to.

Current Behavior

Due to the missing API, the LibreNMS server can no longer see the expected output needed to pull data. The server connects to the other APIs and all are readable as proven using a curl against the APIs listed on the graylog server here: /api/api-browser/global/index.html#!/Search/Query Strings. But none match the legacy API that was previously used.

Possible Solution

Find the old API, and add it to the graylog server APIs available.

Steps to Reproduce (for bugs)

  1. Install LibreNMS on Ubuntu 24.04 using NGINX with an https web interface.
  2. Install Graylog 6.0.7 on an Ubuntu 24.04 server going behind a Apache proxy for web access.
  3. Follow the steps here https://docs.librenms.org/Extensions/Graylog/ on the LibreNMS server to integrate the two.
  4. Watch as it does nothing.

Context

Integrate Graylog into my LIbreNMS

Your Environment

See above

drewmiranda-gl commented 23 hours ago

Hi @davidshirk80 , I recommend opening an issue in the librenms repo as we don't maintain nor provide support for librenms.

You may also have more luck over on our community forum at https://community.graylog.org/

What I can say is that while the "legacy" api endpoint referenced by librenms is technically deprecated, i still am able to get results returned from it:

image

image

Are you able to use debug logs in librenms to have it output what specifically its sending to Graylog? For example the full URI of the api query for /api/search/universal/relative ?

janheise commented 11 hours ago

@davidshirk80 we did fix a small thing with that resource in the 6.1 release https://github.com/Graylog2/graylog2-server/commit/2538e972d89711d4fcf738dff13c0b78b905ce0b but as @drewmiranda-gl pointed out, the API still works and the full api query would be needed to decide if that change could be the cause of your problem

davidshirk80 commented 4 hours ago

Understood, and many thanks - I too was able to duplicate your results and pull data ensuring that connectivity is not the issue here. In the meantime, I have opened an issue with LibreNMS to help see if we can find the issue. Is there anyway we can keep this open for a bit as a reference so that Troubleshooting with them has something to see from their end as well? Many thanks!