MySQL Schema question

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

MySQL Schema question

Post by seaward1983 »

RHEL 6.x
NagiosXI 5.6.9
VMWare

Long way around the barn - but here goes
I added all my hosts for ICMP. I export, regularly, our device list from our managed service provided, compare, and add what is missing. To find out what hosts exists in NagiosXI - I run this query:

use nagios;
select display_name, address from nagios_hosts;

I then export the list, and run a compare. Easy enough.

I'm now adding services, but I'm adding the servers by "type", to make adding by bulk as painless as I can. Is there a way to run a MySQL query to see how many systems I've added services to?

Thank you in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MySQL Schema question

Post by scottwilkerson »

These would be the objects that are active and have services

Code: Select all

select name1 AS HOST from nagios_objects where is_active=1 AND objecttype_id=2 group by name1;
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
seaward1983
Posts: 69
Joined: Wed Jul 17, 2019 2:09 pm

Re: MySQL Schema question

Post by seaward1983 »

PERFECT!! Exactly what I needed.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MySQL Schema question

Post by scottwilkerson »

seaward1983 wrote:PERFECT!! Exactly what I needed.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked