Good morning.

Guys, i was confused. In the host.conf, How Can I apply this command ? I wrote 
this:


object Host "app1oldappd001t.tst.sicredi.net" {
        import "satellite-host"
        check_command = "ldap"

         vars.ldap_address = IP_OF_MY_REMOTEHOST
}

When i try to reload icinga2 services...

critical/config: Error: Object 'app1oldappd001t.tst.sicredi.net' of type 'Host' 
re-defined: in 
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf: 6:1-6:45; 
previous definition: in 
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf: 1:0-1:44
Location:
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf(4): }
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf(5):
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf(6): object 
Host "app1oldappd001t.tst.sicredi.net" {
                                                                         
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf(7):        
 import "satellite-host"
/etc/icinga2/repository.d/hosts/app1oldappd001t.tst.sicredi.net.conf(8):        
 check_command = "ldap"



Sorry Guys, I know, I look like a stupid newbie. I read many time the 
Documents, but, Until now, I don't understand the Icinga structure!


Best regards...


--
Atenciosamente,


Édnei Rodrigues

Analista de Infraestrutura - Gestão de Identidades
Confederação Sicredi
www.sicredi.com.br<https://outlook.sicredi.net.br/owa/redir.aspx?C=8cEvgLixeEq55upfN9Y5vVeI7I0Ny9EIEcRLy-bpH1Iyv-WH8bRibq78Ojle7wmnvWh45IRlQIQ.&URL=http%3a%2f%2fwww.sicredi.com.br>
[cid:1429192335.3507.12.camel@localhost]


Em Qua, 2015-04-15 às 13:05 +0200, Tobias von der Krone escreveu:


Hi,

use something like:

object CheckCommand "ldap" {
     import "plugin-check-command"
     import "ipv4-or-ipv6"

     command = [ PluginDir + "/check_ldap" ]

     arguments = {
         "-H" = "$ldap_address$"
         "-p" = "$ldap_port$"
         "-w" = {
             value = "$ldap_warning$"
             description = "Response time to result in warning status
(seconds)"
         }
         "-c" = {
             value = "$ldap_critical$"
             description = "Response time to result in critical status
(seconds)"
         }
         "-4" = {
             set_if = "$ldap_ipv4$"
             description = "Use IPv4 connection"
         }
         "-6" = {
             set_if = "$ldap_ipv6$"
             description = "Use IPv6 connection"
         }
         "-a" = {
             value = "$ldap_attr$"
             description = "ldap attribute to search (default:
"(objectclass=*)""
         }
         "-b" = {
             value = "$ldap_base$"
             description = "ldap base (eg. ou=my unit, o=my org, c=at"
         }
         "-D" = {
             value = "$ldap_bind_dn$"
             description = "ldap bind DN (if required)"
         }
         "-P" = {
             value = "$ldap_pass$"
             description = "ldap password (if required)"
         }
         "-T" = {
             set_if = "$ldap_starttls$"
             description = "use starttls mechanism introduced in protocol
version 3"
         }
         "-S" = {
             set_if = "$ldap_ssl$"
             description = "use ldaps (ldap v2 ssl method). this also
sets the default port to 636"
         }
         "-2" = {
             set_if = "$ldap_ver2$"
             description = "use ldap protocol version 2"
         }
         "-3" = {
             set_if = "$ldap_ver3$"
             description = "use ldap protocol version 3"
         }
         "-t" = {
             value = "$ldap_timeout$"
             description = "Seconds before connection times out (default:
10)"
         }

     vars.ldap_address = "$check_address$"
}

I just wrote it down, so it's not tested. The tcp example is a bad one,
because it don't use the arguments attibute. Also please create an issue
at dev.icinga.org so it will be added to ITL.

Regards,
Tobias

On 2015-04-14 21:34, Ednei Felipe Faleiro Rodrigues wrote:
> Sorry, My mistake, I did not see the result of CRTL+V ( paste wrong).
>  Below is the correct:
>
>  _object CheckCommand "my-ldap-check" {_
>  _ import "plugin-check-command"_
>
>  _ command = [_
>  _ PluginDir + "/check_ldap" + "IP_LDAP" + "-b dc=xxxxx,dc=com,dc=br"
> "-D cn=Manager,dc=br" "-w XXXXX"_
>  _ ]_
>
>  _ arguments = {_
>  _ "-H" = "$address$"_
>  _ }_
>
>  _ vars.address = "$address$"_
>  _ _
>  _}_
>
>  _object Service "my-ldap" {_
>  _ import "generic-service"_
>  _ host_name = "my-server"_
>  _ check_command = "my-ldap-check"_
>
>  _}_
>
>  --
>  Atenciosamente,
>
>  ÉDNEI RODRIGUES
>
>  Analista de Infraestrutura - Gestão de Identidades
>  Confederação Sicredi
>  www.sicredi.com.br<http://www.sicredi.com.br> [2]
>
>  Em Ter, 2015-04-14 às 21:24 +0200, Markus Joosten escreveu:
>
>> Actually no, this is still old Icinga 1 syntax.
>
>> The new syntax for a check command is as follows (taken from example
>> check_tcp):
>
>>
>
>> object CheckCommand "tcp" {
>
>> import "plugin-check-command"
>
>> import "ipv4-or-ipv6"
>
>>
>
>> command = [
>
>> PluginDir + "/check_tcp",
>
>> "-H", "$tcp_address$",
>
>> "-p", "$tcp_port$"
>
>> ]
>
>>
>
>> vars.tcp_address = "$check_address$"
>
>> }
>
>>
>
>> Try to adapt your check command to the new syntax.
>
>> Also the documentation for Icinga2 has a lot of guidance for
>> redefining everything the new way.
>
>>
>
>> Regards,
>
>> Markus
>
>>
>
>> Sent from my iPhone
>
>> On 14 Apr 2015, at 21:16, Ednei Felipe Faleiro Rodrigues
>> <[email protected]<mailto:[email protected]>> 
>> wrote:
>
>> Thanks Markus for the answer!!!
>>
>> So, let me see...
>>
>> In the Old Icinga:
>>
>> _define command{_
>> _ command_name check_ldap_
>> _ command_line $USER1$/check_ldap -H $HOSTADDRESS$ -b
>> "dc=xxxxx,dc=com,dc=br" -D "cn=Manager,dc=br" -w XXXXX_
>> _ }_
>> _define service{_
>> _ use generic-service_
>> _ host_name ds1openldap1h_
>> _ service_description LDAP_
>> _ check_command check_ldap_
>> _}_
>>
>> This Will be:
>>
>> define command{
>> command_name check_ldap
>> command_line $USER1$/check_ldap -H $HOSTADDRESS$ -b
>> "dc=xxxxx,dc=com,dc=br" -D "cn=Manager,dc=br" -w XXXXX
>> }
>> define service{
>> use generic-service
>> host_name ds1openldap1h
>> service_description LDAP
>> check_command check_ldap
>> }
>>
>> Is this right ?
>>
>> --
>> Atenciosamente,
>>
>> ÉDNEI RODRIGUES
>>
>> Analista de Infraestrutura - Gestão de Identidades
>> Confederação Sicredi
>> www.sicredi.com.br<http://www.sicredi.com.br> [2]
>> <assinatura.jpg>
>>
>> Em Ter, 2015-04-14 às 21:02 +0200, Markus Joosten escreveu:
>> Good evening to you ;)
>>
>> It's true, adapting from Icinga 1 / Nagios to Icinga 2 is quite an
>> effort, since literally everything has changed.
>> But from my point of view the effort is well worth it!
>>
>> You still can use your old check_ldap plugin (or whatever you were
>> using) but you have to define the proper command and all arguments.
>> (There is already a command definition for check_tcp if that is
>> enough for you.)
>>
>> You should check the provided configuration examples and the
>> documentation, everything is well documented.
>>
>> Once you have adapted to Icinga2, i'm sure you don't want to miss
>> it again. (talking from my experience of course)
>>
>> Regards,
>> Markus
>>
>> Sent from my BlackBerry 10 smartphone.
>> Original Message
>> From: Ednei Felipe Faleiro Rodrigues
>> Sent: Tuesday, April 14, 2015 6:30 PM
>> To: [email protected]<mailto:[email protected]>
>> Subject: [icinga-users] Icinga2 - Check ldap services
>>
>> Good Afternoon guys! How are you doing ?
>>
>> Guys, I am taking very difficulty to configure a service to check
>> the ldap service for my remote LDAP Server. In the past, I used the
>> Icinga 1 and I did not have difficulty to configure, because was
>> more simple.
>>
>> Now, on icinga 2, Did someone tried to configure this service ?
>>
>> Thanks for the reply!
>>
>> --
>> Atenciosamente,
>>
>> ÉDNEI RODRIGUES
>>
>> Analista de Infraestrutura - Gestão de Identidades
>> Confederação Sicredi
>> www.sicredi.com.br<http://www.sicredi.com.br> [2]
>>
>> -------------------------
>>
>> Esta mensagem é somente para uso do destinatário informado e pode
>> conter informações privilegiadas, proprietárias, ou privadas. Se
>> você recebeu esta mensagem por engano, por favor notifique o
>> remetente imediatamente e apague a original. Qualquer uso deste
>> email é proibido.
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you
>> have received it in error, please notify the sender immediately and
>> delete the original. Any other use of the email by you is
>> prohibited.
>>
>> -------------------------
>>
>> Esta mensagem é somente para uso do destinatário informado e pode
>> conter informações privilegiadas, proprietárias, ou privadas. Se
>> você recebeu esta mensagem por engano, por favor notifique o
>> remetente imediatamente e apague a original. Qualquer uso deste
>> email é proibido.
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you
>> have received it in error, please notify the sender immediately and
>> delete the original. Any other use of the email by you is
>> prohibited.
>>
>> _______________________________________________
>>
>> icinga-users mailing list
>>
>> [email protected]<mailto:[email protected]>
>>
>> https://lists.icinga.org/mailman/listinfo/icinga-users [1]
>>
>> _______________________________________________
>>
>> icinga-users mailing list
>>
>> [email protected]<mailto:[email protected]>
>>
>> https://lists.icinga.org/mailman/listinfo/icinga-users [1]
>>
>> Esta mensagem somente para uso do destinatrio informado e pode
>> conter informaes privilegiadas, proprietrias, ou privadas. Se voc
>> recebeu esta mensagem por engano, por favor notifique o remetente
>> imediatamente e apague a original. Qualquer uso deste email
>> proibido.
>>
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you
>> have received it in error, please notify the sender immediately and
>> delete the original. Any other use of the email by you is
>> prohibited.
>
>>> -------------------------
>>>
>>> Esta mensagem é somente para uso do destinatário informado e
>>> pode conter informações privilegiadas, proprietárias, ou
>>> privadas. Se você recebeu esta mensagem por engano, por favor
>>> notifique o remetente imediatamente e apague a original. Qualquer
>>> uso deste email é proibido.
>>> This message is for the designated recipient only and may contain
>>> privileged, proprietary, or otherwise private information. If you
>>> have received it in error, please notify the sender immediately
>>> and delete the original. Any other use of the email by you is
>>> prohibited.
>
>>> _______________________________________________
>>>
>>> icinga-users mailing list
>>>
>>> [email protected]<mailto:[email protected]>
>>>
>>> https://lists.icinga.org/mailman/listinfo/icinga-users [1]
>
>>> <assinatura.jpg>
>
>> -------------------------
>>
>> Esta mensagem é somente para uso do destinatário informado e pode
>> conter informações privilegiadas, proprietárias, ou privadas. Se
>> você recebeu esta mensagem por engano, por favor notifique o
>> remetente imediatamente e apague a original. Qualquer uso deste
>> email é proibido.
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you
>> have received it in error, please notify the sender immediately and
>> delete the original. Any other use of the email by you is
>> prohibited.
>
>> _______________________________________________
>> icinga-users mailing list
>> [email protected]<mailto:[email protected]>
>> https://lists.icinga.org/mailman/listinfo/icinga-users [1]
>>
>> Esta mensagem somente para uso do destinatrio informado e pode
>> conter informaes privilegiadas, proprietrias, ou privadas. Se voc
>> recebeu esta mensagem por engano, por favor notifique o remetente
>> imediatamente e apague a original. Qualquer uso deste email
>> proibido.
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise private information. If you
>> have received it in error, please notify the sender immediately and
>> delete the original. Any other use of the email by you is
>> prohibited.
>
> -------------------------
>  Esta mensagem é somente para uso do destinatário informado e pode
> conter informações privilegiadas, proprietárias, ou privadas. Se
> você recebeu esta mensagem por engano, por favor notifique o
> remetente imediatamente e apague a original. Qualquer uso deste email
> é proibido.
>  This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete
> the original. Any other use of the email by you is prohibited.
>
> Links:
> ------
> [1] https://lists.icinga.org/mailman/listinfo/icinga-users
> [2]
> https://outlook.sicredi.net.br/owa/redir.aspx?C=8cEvgLixeEq55upfN9Y5vVeI7I0Ny9EIEcRLy-bpH1Iyv-WH8bRibq78Ojle7wmnvWh45IRlQIQ.&amp;URL=http%3a%2f%2fwww.sicredi.com.br
>
> _______________________________________________
> icinga-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.icinga.org/mailman/listinfo/icinga-users




Esta mensagem é somente para uso do destinatário informado e pode conter 
informações privilegiadas, proprietárias, ou privadas. Se você recebeu esta 
mensagem por engano, por favor notifique o remetente imediatamente e apague a 
original. Qualquer uso deste email é proibido. 
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to