Nagios Core and NagiosQL

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
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Nagios Core and NagiosQL

Post by emi65 »

I'm using nagios Core 3.5.1 and NagiosQL 3.2.0

My goal is defined two config one for monitor the production server and
another for monitor test server

I defined by NagiosQL two Target configuration (localhost and TestServer)
with different dir for nagiosql configuraton file .

Also I defined a new nagios config file /etc/nagios/nagiostest.cfg for target TestServer

I defined a new datadomain TestServer with config Target TestServer .

I defined a TestOperator user and group and I config this user to the taget .

I'am able to save the config files and restart nagios but I don't undestand
how a user can view the server of the TestServer tarfet from nagios core interface .

I know It is not easy to explain but .... please ask all question as you like to understand .

Tks
Emilio
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios Core and NagiosQL

Post by abrist »

emi65 wrote:I'am able to save the config files and restart nagios but I don't undestand
how a user can view the server of the TestServer tarfet from nagios core interface .
Just to clarify, are you trying to run two separate nagios monitoring configurations from the same box or are you just trying to set up 2 different hosts to be monitored?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Nagios Core and NagiosQL

Post by emi65 »

The goals is to have
one nagios installation running on the one linux machine
and when get in with user1 I want
to see serverA and when I get in with user2 I want to see serverB.

I hope to clarify the situation .

Tks
Emilio
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios Core and NagiosQL

Post by abrist »

If that is the case, just set each user as separate contacts:
-User1 as a contact on ServerA
-User2 as a contact on ServerB
Check cgi.cfg to verify that neither of the contacts are authorized for all hosts and servers, otherwise they will be able to each see both servers.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Nagios Core and NagiosQL

Post by emi65 »

OK this solution works welll |||
.... but ...

Does it possible to get the same result using hostgroup ?

When get in with user1 I want
to see the servers in HOSTGROUPA and when I get in with user2 I want to see servers
in HOSTGROUPB .

Many thks for your help
Emilio
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios Core and NagiosQL

Post by jolson »

A hostgroup can have the following definitions:

Code: Select all

	hostgroup_name	hostgroup_name
	alias	alias
	members	hosts
	hostgroup_members	hostgroups
	notes	note_string
	notes_url	url
	action_url	url
It does not look like there is a way to add a contact to a hostgroup. You will have to assign contacts to hosts individually.

For instance: you have two users, John and Amy. You assign John to host A and host B, and Amy to host C. All of these hosts are in the same hostgroup.

John will see the hostgroup, but it will only contain hosts A and B. Amy will see the hostgroup as well, but she will only see host C. I hope this helps clear things up.

If you are looking for a solution with more robust multi-tenancy features, Nagios XI makes configuration of this sort a lot easier. Thank you!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Nagios Core and NagiosQL

Post by emi65 »

Hi Jolson

Many thanks for all your help

Bye
Emilio
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios Core and NagiosQL

Post by jolson »

No problem - is there anything else we can help you with, or is this thread good to close?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Nagios Core and NagiosQL

Post by emi65 »

Thanks+
You can consider close this 3rd
Ciao
Emilio
Locked