[op5-users] Ninja views

Hienz, Michael MHienz at LEAR.com
Mon Oct 26 13:14:37 CET 2009


Thanks Per for the information, I probably haven't stepped into this kind of problem, because I changed mostly all path entries according to my Nagios install.
In simple words what is mainly needed is a correct cgi.cfg config file, with adjusted paths information in one or more nacoma/ninja php files, as long as the own Nagios install is using other paths than the op5 default install ? Thanks as well for the additional information regarding the roles tables. I am just starting to test ninja + nacoma and merlin and such additional info is always appreciated, to get an idea how exactly the programs work and which tables and fields are affected.

Michael



-----Ursprüngliche Nachricht-----
Von: op5-users-bounces at lists.op5.com [mailto:op5-users-bounces at lists.op5.com] Im Auftrag von Per Åsberg
Gesendet: Montag, 26. Oktober 2009 09:26
An: Mailinglist for op5's products
Betreff: Re: [op5-users] Ninja views


On Fri, Oct 23, 2009 at 4:11 PM, Pier <pierg75 at yahoo.it> wrote:
>
>> if the ninja_user_authentication table is empty and you
>> would like to have admin access you need you insert in to
>> this table one record, with the user_id from your nagios
>> admin user, that should be found in the user table. If you
>> do not have your Nagiosadmin in this table as well, you need
>> to create it. All other values should be set to one in the
>> ninja_user_authentication table record, well except the id
>> field as it is auto_incrementing. You also need to look into
>> the roles table to see which id the admin role has. Remember
>> this ID and check the roles_user table. If the ID of your
>> nagiosadmin can't be found in there, create a record and
>> insert the ID of your nagiosadmin, plus the admin id for the
>> role_id, which you could look up in the roles table.
> Hi.
> Thank you for the explanation...i checked in the db and actually i have no user defined in ninja_user_authentication; so i added one manually with id 1 (that actually is nagiosadmin) with all 1's in the other fields.
> I logout from ninja, logged in and i found the table emplty again:
>
> mysql> select * from ninja_user_authorization;
> +----+---------+--------------------+---------------------------+-----------------+--------------+-----------+----------------------+-------------------+
> | id | user_id | system_information | configuration_information | system_commands | all_services | all_hosts | all_service_commands | all_host_commands |
> +----+---------+--------------------+---------------------------+-----------------+--------------+-----------+----------------------+-------------------+
> |  1 |       1 |                  1 |                         1 |               1 |            1 |         1 |                    1 |                 1 |
> +----+---------+--------------------+---------------------------+-----------------+--------------+-----------+----------------------+-------------------+
> 1 row in set (0.00 sec)
>
>
> mysql> select * from ninja_user_authorization;
> Empty set (0.00 sec)
>
>
> Why?
> Now in ninja i can see only the localhost machine (nagios) and no others.


Each time you log in to your Ninja GUI, it attempts to synchronize the 
settings in your Nagios cgi.cfg. Modifying the contents of the 
ninja_user_authorization table manually won't change anything since it is 
overwritten at the next successful login.

The problem that you are having here, is probably a result of the fact that 
Ninja is unable to find the cgi.cfg file (or any valid data in it), hence 
failing to insert anything into the ninja_user_authorization table.

And Michael - the roles table doesn't do anything for you when it comes to 
your Nagios installation. I understand that this is somewhat confusing but the 
reason the roles table exists is simpy to make the Kohana (the underlying PHP 
framwork that Ninja is built upon) auth module to work. The roles aren't 
really used in Ninja today but may possibly be in the future.

I would suggest the following:
* Check cgi.cfg and make sure that nagiosadmin is mentioned there (in the 
"authorized_for_" variables). Using '*' (all) will currently not work.

* Check 'nagios_base_path' (and 'nagios_etc_path' if you don't have the Nagios 
/etc dir below nagios_base_path) in config/config.php and make sure it is 
properly set.

Hope this helps.

Regards,

/Per

----------------------
Per Asberg
Senior Developer
www.op5.com

_______________________________________________
op5-users mailing list
op5-users at lists.op5.com
http://lists.op5.com/mailman/listinfo/op5-users

**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.


More information about the op5-users mailing list