Page 1 of 1
limit show alert on nagios xi?
Posted: Fri Jul 16, 2021 3:27 am
by sacom01
hi team,
I have a plugin check process on my server.
when i run my plugin on command line, it show 30 rows alert, but in Nagios XI Web, show ab 7-8 rows only.
Dont know is there any limit on nagios xi show?
thank you
Re: limit show alert on nagios xi?
Posted: Fri Jul 16, 2021 4:19 pm
by dchurch
The database field holding the plugin output is constrained to a certain number of characters so it must truncate the output it holds onto. The reason is that Nagios XI takes and categorizes and archives output from plugins for auditing and reporting, often months after the fact. As such the database can get bogged down with inefficient queries if it holds onto more output than that.
Re: limit show alert on nagios xi?
Posted: Sun Jul 18, 2021 9:23 pm
by sacom01
if so, the alert will not exact as it need.
How to fix for this case?
Re: limit show alert on nagios xi?
Posted: Mon Jul 19, 2021 1:45 pm
by dchurch
Can you please run this command?
Code: Select all
mysqldump -uroot -pnagiosxi nagios | gzip -9 >/tmp/nagios.sql.gz
Then PM the resulting /tmp/nagios.sql.gz file?
Re: limit show alert on nagios xi?
Posted: Tue Jul 20, 2021 3:50 am
by sacom01
sent you, pls check ib
Re: limit show alert on nagios xi?
Posted: Tue Jul 20, 2021 12:15 pm
by dchurch
What command is it that you're running to generate the 30 rows of alerts?
Re: limit show alert on nagios xi?
Posted: Tue Jul 20, 2021 8:50 pm
by sacom01
Run this on command. All arguments fixed inside the code.
Re: limit show alert on nagios xi?
Posted: Wed Jul 21, 2021 1:43 pm
by dchurch
For some reason the output column isn't a TEXT column, but a varchar(255) column.
Try running the following command:
Code: Select all
mysql -uroot -pnagiosxi nagios <<'EOSQL'
alter table nagios_servicestatus modify output text NOT NULL;
alter table nagios_statehistory modify output text NOT NULL;
alter table nagios_systemcommands modify output text NOT NULL;
alter table nagios_eventhandlers modify output text NOT NULL;
alter table nagios_hostchecks modify output text NOT NULL;
alter table nagios_hoststatus modify output text NOT NULL;
alter table nagios_notifications modify output text NOT NULL;
alter table nagios_servicechecks modify output text NOT NULL;
alter table nagios_servicestatus modify output text NOT NULL;
alter table nagios_statehistory modify output text NOT NULL;
EOSQL
Then re-run the service check from the web interface by clicking "Force an immediate check"
Re: limit show alert on nagios xi?
Posted: Wed Jul 21, 2021 10:45 pm
by sacom01
after run these commands and force check, it work, show all alert, bug only ONE time. After that it back as before, less than 10 rows. I tried some times but not work again.
Re: limit show alert on nagios xi?
Posted: Thu Jul 22, 2021 3:43 pm
by dchurch
In order to escalate this issue and take a deeper dive into what's causing this, I'd suggest you
create a ticket so we can hopefully get this resolved ASAP.