duplicate entry; unknown time outs?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
seaward1983
Posts: 69
Joined: Wed Jul 17, 2019 2:09 pm

duplicate entry; unknown time outs?

Post by seaward1983 »

Red Hat Enterprise Linux Server release 7.9 (Maipo)
x86_64
Manual install of XI -- running since 2019
Version of XI - Installed Version: 5.8.3
Attaching profile

I've added additional monitoring (bandwidth) for 5 servers in our environment. Two servers - I had mixed results. Three of the servers - fine/flawless. Two of them, though - went something like this:
  • Used NCPA - added the system - token - blah blah.
    It sat for an extended period of time - but finally came up with the objects available for monitoring
    Deselected everything but bond0 NICs
    Applied - get this error -- something to the effect of "Duplicate entry '1' for key 'config_name'Entry host_name:: inside tbl_host could not be inserted".
    When getting that error - I log into the server -- cd /usr/local/nagios/etc/import - and delete the temp file. Then cd /usr/local/nagiosxi/scripts - ran ./reconfigure_nagios.sh - and it came back clean.
    Went ahead in Nagios gui - "apply the configuration".... and the "apply the configuration" - and it works "without error".
    Looking at CCM>Monitoring>Services - the bandwidth services show "Active:Yes" "Status:Not Applied"
    Looking at Service>Status -- the services are there, and it's getting responses, gathering data - is there a switch that needs to be flipped in the database to show it's "applied"? I've tried de-activating it, and reactivating it - no joy; I've tried creating the service outside of the wizard - same thing. Maybe there is a time-out issue - because of how LONG it takes to get a response for the server?
Weird to note, too, when this happens -- all of the counters wig out for the particular server -- "wig out" - translates into all of the counters for the server go into an "unknown" state.
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: duplicate entry; unknown time outs?

Post by vtrac »

Hi,
How are you doing?

Please open a Nagios XI command prompt and run the below command.
Please replace 'hostName' which contain the issue.

Code: Select all

echo "select * from nagios_objects where name1 = 'hostName';" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagios --table
Now, please look at the "is_active" column ... "1" = active, "0" = not active.
Does that service says "0" or "1"?

Here's an example picture of my test:
Th1.png

Let's try and delete those config files and see what happens.
Nagios XI GUI > Core Config Manager > Tools > Config File Management
Click "Delete Files"
Click "Write Configs"
Click "Verify Files"
Now do "Apply Configuration"

Does that service still says "Active" and "Applied" now?

Please share screenshots, if possible ... :-)

Now, please run the "select" statement (above) again .... and upload screenshot, please.


Best Regards,
Vinh
You do not have the required permissions to view the files attached to this post.
seaward1983
Posts: 69
Joined: Wed Jul 17, 2019 2:09 pm

Re: duplicate entry; unknown time outs?

Post by seaward1983 »

You can close this. No, didn't figure it out -- but found when I removed everything related to the host including the host, and add the whole thing back - it's fine. So I'll just delete everyone I need to do this on if necessary.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: duplicate entry; unknown time outs?

Post by vtrac »

Hi,
I'm glad that you have figured out the solution for this issue ... :-)

Closing ticket!!


Regards,
Vinh
Locked