Skip to content

NSTI: 3.0.3: Only Query Database for Traps That Are Being Viewed (very short load times even in large environments) #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
varnar opened this issue Feb 2, 2015 · 9 comments
Assignees
Milestone

Comments

@varnar
Copy link

varnar commented Feb 2, 2015

Hello,

It is any way before show traps having possibility to select the date/time, for example:
"Last 15min", "Last 60min", "Last 4h", "Last 24h", "Today", "Last 7days" and then giving some possibility to enter date/time for loading data.

Because, if DB is already of-loaded on separate server and you have 22249 Traps Total it is going to be slow.

Thanks

@varnar varnar changed the title NSTI: 3.0.2: The loading of trups is slow NSTI: 3.0.2: The loading trups is slow Feb 2, 2015
@lgroschen
Copy link
Contributor

Varnar, thanks for your interest!

I'm going to use something like the following: https://datatables.net/examples/plug-ins/api.html

Not sure if that's the exact way to go, but something similar where the jquery doesn't load more than what needs to be viewed by the page. Every time you use the pagination it reloads and draws the tds, etc. Also will inlcude the number to display at a time, sorting of all columns and those will be saved through navigation until set again and lastly it includes a search bar which I am planning on adding a regex to. If I can get a regex in there I might be able to just allow any type of query on any column against any row and include wild cards, something like this might satisfy your request.

In the mean time have you tried using the filter feature shown here? Just use the dropdown on the page to apply the filter to the table view:

nsti_020215_filter

@lgroschen lgroschen changed the title NSTI: 3.0.2: The loading trups is slow NSTI: 3.0.2: The loading traps is slow Feb 2, 2015
@varnar
Copy link
Author

varnar commented Feb 11, 2015

Hello @lgroschen
Yes, that filter is working and it really works when all traps is already loaded :)

@lgroschen
Copy link
Contributor

I'm going to leave this open as a general feature request.

Hope to make NSTI only load the traps that are going to display since it should know by ID. Then you would never have to query the whole database every time you load a page or apply a filter. Using the table in my previous comment will help do this while also adjusting the backend that loads the trap table.

@lgroschen lgroschen changed the title NSTI: 3.0.2: The loading traps is slow NSTI: 3.0.3: Only Query Database for Traps That Are Being Viewed (very short load times even in large environments) Feb 11, 2015
@hedenface
Copy link
Contributor

Added to 3.0.3

@hedenface hedenface added this to the 3.0.3 milestone Jun 17, 2017
@hedenface hedenface self-assigned this Jun 17, 2017
@bjornfro
Copy link

bjornfro commented Aug 8, 2017

When will 3.0.3 be available and was/is this fixed there? I have this problem where NSTI is extremely slow. I have many many thousands of SNMP traps in DB. Guess I need to revert to old Nagtrap if this is not planned to be implemented.

@jomann09
Copy link
Contributor

jomann09 commented Aug 8, 2017

Are you running this in conjunction with Naigos XI or Nagios Core?

The issue is that the entire DB set is being pulled into the datatables library, from what I can understand, and is being changed in the new version.

@bjornfro
Copy link

bjornfro commented Aug 8, 2017

No, not running either. Not sure what that matters. I'm talking about the NSTI web interface.

I know the issue is the entire DB being pulled. Question is if this is planned to be adjusted anytime soon?

@jvandermeulen
Copy link

@jomann09 Also curious for the answer to the question(s) of @bjornfro

@jomann09
Copy link
Contributor

I was only asking because we are planning on a new version of NSTI, which will not be pulling the whole database, but will be integrated with our products. We likely won't be updating this version of NSTI any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants