Strange think

Fabiano Martins fabianomartinsrj at gmail.com
Tue Jan 22 20:19:10 CET 2008


Hi all!

I've tried what hugo has poted.

I've got it workin using the following lines on commands.cfg

check_http -H $ARG1$ -u $ARG2$ -s $ARG3$

Only with that syntax I could got the webservices check fair!

Thanks for all messages!!

Regards,

Fabiano



On Jan 21, 2008 6:33 PM, Hugo van der Kooij <hvdkooij at vanderkooij.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Fabiano Martins wrote:
> | Hi all!!
> |
> | I have a strange issue here with my nagios. Let me try to explain...
> |
> | I have some web services to check and when I run the command from
> | console to test two diferent status of these services (UP or DOWN) I
> | receive the correct answer from remote application. Let me put the
> | command here:
> |
> | ./usr/local/nagios/libexec/check_http -H www.somehost.com.br
> | <http://www.somehost.com.br/> -u /heartbeat.asmx/Web -s '<boolean
> | xmlns=" http://www.somehost.com.br/">true</boolean>'
> | <http://www.somehost.com.br/%22%3Etrue%3C/boolean%3E'>
> |
> | As the check_http says, I have to use check_http -H <vhost> -u URL path
> | that I wan to check on specified host and -s <string> that I expect to
> | be returned to me.
> |
> | Ok!
> |
> | I run this command from console and everything goes fine. To test, I've
> | changed the expected string from true to false, and the answer received
> | after running the command from console changes to "DOWN String not found".
> |
> | The problem is, when I put it into service.cfg for nagios run the
> | command, I've realized that nagios is not threating the return. If the
> | service is down, nagios keeps showing me that the service is OK.
> |
> | In command.cfg file, I've changed the line check_http command to add one
> | more argument that I need.
> |
> | The default is check_http -H $HOSTADDRESS$ $ARG1$.
> |
> | I've changed it to check_http -H $HOSTADDRESS$ $ARG1$ $ARG2$
> |
> | In services.cfg file I put check_http!www.somehost.com.br -u
> | /heartbeat.asmx/Web!'<boolean
> | xmlns="http://www.somehost.com.br/">true</boolean>'
> | <http://www.somehost.com.br/%22%3Etrue%3C/boolean%3E'>
> |
> | I think that nagios is doesn't recognizing the sintax.
>
> It seem you are mixing things in a odd manner.
>
> I would recommend to define the command with:
>
> define command{
>        command_name    check_http_reply
>        command_line    $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -u  $ARG2$
> - -s  $ARG3$
>        }
>
> Then define the service with:
>        check_http_reply!www.somehost.com.br!/heartbeat.asmx/Web!'<boolean
> xmlns="http://www.somehost.com.br/">true</boolean>'
>
> I would never try to mix the arguments the way you did.
>
> Hugo.
>
> - --
> hvdkooij at vanderkooij.org               http://hugo.vanderkooij.org/
> PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc
>
>        A: Yes.
>        >Q: Are you sure?
>        >>A: Because it reverses the logical flow of conversation.
>        >>>Q: Why is top posting frowned upon?
>
> Bored? Click on http://spamornot.org/ and rate those images.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
>
> iD8DBQFHlQF5BvzDRVjxmYERAoNNAJ9BAmNX8jaVg64ziBbvxYHfj4U0JACdEmpL
> jwM3YfmS0UoiCn91aBj5tfU=
> =sJNx
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list