NagiosXI 5.5.3 allowing bad data?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
medleyb
Posts: 31
Joined: Fri Jan 15, 2016 9:54 am

NagiosXI 5.5.3 allowing bad data?

Post 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?
jforcier

Re: NagiosXI 5.5.3 allowing bad data?

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI 5.5.3 allowing bad data?

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
medleyb
Posts: 31
Joined: Fri Jan 15, 2016 9:54 am

Re: NagiosXI 5.5.3 allowing bad data?

Post by medleyb »

Staff were trying to save a configuration unrelated to the two items in question.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI 5.5.3 allowing bad data?

Post by scottwilkerson »

All configuration data can be downloaded from Configure -> Core Config Manager -> Configuration Snapshots
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
medleyb
Posts: 31
Joined: Fri Jan 15, 2016 9:54 am

Re: NagiosXI 5.5.3 allowing bad data?

Post 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!!!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI 5.5.3 allowing bad data?

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked