Page 1 of 1

NagiosXI 5.5.3 allowing bad data?

Posted: Wed Sep 19, 2018 1:10 pm
by medleyb
I have had to correct these elements oin the nagiosql database. Somehow data is either getting dropped, set to NULL, or the wizards are allowing "empty" data to be posted.

| . | host_name | . |
+---+------------------+---+
| . | | . |

and in

+------+-----------+----------------------------------------------------------------+
| id | host_name | service_description |
+------+-----------+----------------------------------------------------------------+
| 5240 | 1 | wlsvc QA220_AdminServer |
| 5241 | 1 | |
| 5242 | 1 | IMFPlusService64.exe |

The host_name column in tbl_host is marked NULL=NO, DEFAULT=NULL(?!??) as is service_description in tbl_service.

How do I enforce the NOT NULL condition?

Re: NagiosXI 5.5.3 allowing bad data?

Posted: Thu Sep 20, 2018 12:13 pm
by jforcier
The host_name column in tbl_host is marked NULL=NO, DEFAULT=NULL(?!??) as is service_description in tbl_service.
This is normal, it basically means you have to provide a value for this. If you think of it as a first name, it can't be null, but there is no way to have a default name for first name.

Can you post your db error log?

Code: Select all

/var/log/mariadb/mariadb.log
or
/var/log/mysqld.log

Re: NagiosXI 5.5.3 allowing bad data?

Posted: Thu Sep 20, 2018 12:28 pm
by scottwilkerson
I'd like to also step back and ask what is the problem you are trying to resolve?

I ask because there are good reasons for these to be how they are. You can make a service config without having a host_name, it could be a template, or could have hostgroup assigned instead of a service.

Instead of digging into database design, can we assist you with a problem you are seeing in the UI?

Re: NagiosXI 5.5.3 allowing bad data?

Posted: Thu Sep 20, 2018 3:16 pm
by medleyb
Staff were trying to save a configuration unrelated to the two items in question.

Re: NagiosXI 5.5.3 allowing bad data?

Posted: Thu Sep 20, 2018 3:39 pm
by scottwilkerson
All configuration data can be downloaded from Configure -> Core Config Manager -> Configuration Snapshots

Re: NagiosXI 5.5.3 allowing bad data?

Posted: Thu Sep 20, 2018 11:44 pm
by medleyb
That's how I discovered the problem :)

We are also in the process of moving from CentOS 6.10 to RHEL 7.5. Once we have that up and running, we can pursue this if it happens agin on the new environment.

Thanks, Scott!!!

Re: NagiosXI 5.5.3 allowing bad data?

Posted: Fri Sep 21, 2018 7:05 am
by scottwilkerson
medleyb wrote:That's how I discovered the problem :)

We are also in the process of moving from CentOS 6.10 to RHEL 7.5. Once we have that up and running, we can pursue this if it happens agin on the new environment.

Thanks, Scott!!!
Ok, locking this thread for now