Graylog2 / graylog2-server

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

Manage alert notifications only shows 2 pages, when there are more #3612

Closed TheFlexican closed 7 years ago

TheFlexican commented 7 years ago

After creating a new notification, when I browse to the Manage alert notifications page, there are 2 pages with notifications. The name of the first notification starts with the capital letter A, and the last notification on page 2 starts with a capital letter I. I know there are more notifications configured that starts with letters after the I, but i can't see them. When I create a new notification, starting with the letter A, I can see it on page 1, the notification on page 2 with the letter I dissapears, and now there is a new last notification, which was the one above the one now dissapeared. When i remove the previous made notification starten with the letter A, I can see the notification starting with the letter I on the last page again. Have restarted the graylog-server service.

Expected Behavior

I would expect to see 3 pages, with configured notifications.

Current Behavior

Only loading 2 pages with notifications. The webconsole doesn't show anything error related.

Possible Solution

I have no clue.

Steps to Reproduce (for bugs)

I guess, it happend after I created a new notification, by which i went over a preconfigured limit if there is any.

Context

I can't edit, the newly created notification, and other notifications that aren't displayed.

Your Environment

dennisoelkers commented 7 years ago

I just tried to reproduce the error on the exact same version you specified and failed. I created more than 20 alert conditions and pagination as well as the list shows them as expected.

How many alert conditions do you get when do a curl -u $youruser:$yourpassword http://$graylog/api/alerts/conditions? Is the number of alert conditions returned correct?

TheFlexican commented 7 years ago

No it's not correct, i'm missing some notifications which i can see while i browse to the notifications page. I'm only seeing 17 returned from curl.And just noticed that the notification page is returning duplicate entries on page 1 and 2. So what i see is, on the first page there are 10 notifications, and on page 2 there are 10 notifications. What i'm seeing is on page 1 is notifications with title 1-10 and on page 2 i see notifications 2-11. So on page 2 i'm not seeing the top most notification entry from page 1, but I'm seeing the other 9, plus 1 extra which isn't on page 1. Hope it doesn't sound to confusing. I've included 2 screenshots, where you can see the bottom of page 1 and page 2, and you can see that there are 2 identical notifcations displayed altough i only created it once. The json that curl returned is valid, i posted in duckduck.go json parser. 1 2

dennisoelkers commented 7 years ago

Sorry, my fault. I thought you mean alert conditions, not notifications. Testing again and getting back to you.

dennisoelkers commented 7 years ago

I can reproduce the problem. Thanks for reporting it! We will hopefully be able to fix it soon and include the fix in one of the next version.