opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
330 stars 75 forks source link

cannot add new object via objectbrowser -> add -> host -> advanced #54

Closed palli closed 11 years ago

palli commented 12 years ago

clicking save results in an error "unable to get object ID XXXXX"

palli commented 12 years ago

These views don't support posting into without specifying a valid ID.

(r'/geek_edit/id=(?P<object_id>.+)$', 'objectbrowser.views.geek_edit'),
(r'/advanced_edit/id=(?P<object_id>.+)$', 'objectbrowser.views.advanced_edit'),
tomas-edwardsson commented 12 years ago

There is a problem where this is particularly serious. Add for Contactgroups/hostgroups/servicegroups all use the advanced_edit form and therefore it is not possible to add new items of these types.

andresriancho commented 11 years ago

I'm seeing the same error here while trying to create a new host using the object browser. The error I get is:

Unable to get object
'2008215832818304213'

The files in /etc/nagios/adagios/hosts/ are actually being created and (at least at first glance) they look like they have all the information I wanted:

define host {
     check_period                   24x7                          
     active_checks_enabled          1                             
     check_command                  check_ec2_load 20 90 i-6ac5e600
     alias                          ec2 instance                  
     host_name                      ec2 instance                  
     check_interval                 5                             
     address                        ec2-184-73-81-137.compute-1.amazonaws.com
     max_check_attempts             2                             
}

But I get this error and can't really do anything about it. Ideas?

andresriancho commented 11 years ago

Same thing happens when I try to create a new service.

tomas-edwardsson commented 11 years ago

Can you check if /etc/nagios/adagios is configured in nagios.cfg, you can check with:

pynag config --get cfg_dir

If it is missing you can add it with:

pynag config --append cfg_dir=/etc/nagios/adagios
andresriancho commented 11 years ago
root@ubuntu:/opt/adagios# pynag config --get cfg_dir
/etc/nagios-plugins/config
/etc/nagios3/conf.d
root@ubuntu:/opt/adagios# 

I think that means it is set?

tomas-edwardsson commented 11 years ago

No, the adagios cfg_dir is missing:

pynag config --append cfg_dir=/etc/nagios3/adagios