[op5-users] ninja

Andreas Ericsson ae at op5.se
Thu Jul 9 21:46:30 CEST 2009


Your email was weirdly wrapped (well, not wrapped at all actually).
If it's some setting on your side, could you please try and turn on
wrapping of plaintext email?

Some light will be shed below.

a.hanifi at ville.laval.qc.ca wrote:
> I don't know if im doing something wrong here I ve just grabbed  the
> latest snapshot of merlin and ninja from git
> 
> So far , Merlin is working just fine .. the only problem I saw so far
> is that Merlin will not try to reconnect if mysql goes done .. I
> tested  this by stopping mysql for a couple of minutes .. and
> starting it again. Merlin will complaint  DB is still down .. so you
> just have to restart it again.
> 

Right. I didn't actually think of that. The fix is quite simple though,
so I'll push it to git once I've tested it (should happen within 10-15
minutes).

> On the ninja side the story is a little bit different . I have run
> the ninja_db_init.sh  to update the Merlin database , and verified
> some tables are indeed created . I can logon to the web interface
> using the default user/password (monitor/monitor) , the problem is
> that ninja cannot read in host or services information .. First test
> .. I thought maybe it's  not communicating with mysql .. so I stopped
> mysql service again .. and immediately ninja gave a nice error saying
> it cannot communicate with mysql! Sounds cool. I verified the content
> of the Merlin database .. and as expected the db is ok
> 
> mysql> use merlin; Reading table information for completion of table
> and column names You can turn off this feature to get a quicker
> startup with -A
> 
> Database changed mysql> select count(*) from host; +----------+ |
> count(*) | +----------+ |       18 | +----------+ 1 row in set (0.00
> sec)
> 
> mysql> mysql> select count(*) from service; +----------+ | count(*) |
>  +----------+ |       60 | +----------+ 1 row in set (0.00 sec)
> 
> mysql>
> 
> the only page that shows some infos is  the Comments page which show
> all  the comments.
> 

Right. I think you haven't configured "monitor" as an authorized contact
for any of your hosts, have you? There's a php-script in the directory
cli-helpers in the ninja tree. It's called htpasswd-import.php. You can
run that to import an existing .htpasswd file into the ninja database.
Just running "php htpasswd-import.php" will give you an overview of the
options it takes. After that you should be able to log in using your
standard usernames that are configured to actually get to see things
in the user interface.

If your users have password hashes created with the apr implementation
of the md5 password hash, you will need to run "make" in the cli-helpers
directory to compile the program apr_md5_validate before you can log in.
No dependencies beyond the default gcc compiler and libc-devel packages
are required, so it should be fairly straightforward. Just type "make"
and it should build nicely.


> 2-  when I click on  the Host group Overview  I get I little message
> saying:  The requested group ('windows-servers') wasn't found So
> somehow it knows I have a host group named windows-servers .. it just
> can't show more info about it ! Again when I click on Hostggroup_grid
> link I get a kohana error :
> 

Right. I *think* the hostgroup_grid (and servicegroup_grid) pages are
somewhat buggy under certain circumstances. We haven't worked a whole
lot on them, but this is something we'll have to look into.

> An error was detected which prevented the loading of this page. If
> this problem persists, please contact the website administrator. 
> application/controllers/status.php [1418]: Invalid argument supplied
> for foreach() Stack Trace
> 
> *   application/controllers/status.php [1299]: 
> Status_Controller->_show_grid( host, APC-Sensors )
> 
> *   application/controllers/status.php [1239]: 
> Status_Controller->group_grid( host, all ) *
> Status_Controller->hostgroup_grid(  )
> 
> *   system/core/Kohana.php [313]:
> 
> so from this line: Status_Controller->_show_grid( host, APC-Sensors )
>  It somehow know about a group named APC-Sensors. So This is it ..
> maybe I missed something ? Thanks
> 

Well, it obviously isn't supposed to crash out like that. It does so
because we're shipping Ninja with developer settings by default, so we
can get reports like this for when it does.

Thanks a lot for pasting the full output here. It really helps when
tracking down issues.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.


More information about the op5-users mailing list