You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2011/08/14 08:10:27 UTC

[jira] [Created] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
--------------------------------------------------------------------------------------------------

                 Key: CAMEL-4332
                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
             Project: Camel
          Issue Type: Improvement
    Affects Versions: 2.8.0
            Reporter: Claus Ibsen
            Priority: Trivial
             Fix For: Future


See nabble
http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html

If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.

All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4332) camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathieu Lalonde updated CAMEL-4332:
-----------------------------------

    Affects Version/s:     (was: 2.8.0)
           Issue Type: Test  (was: Improvement)
              Summary: camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios  (was: camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios)

Claus, I took the initiative to update this issue to better reflect that it's a simple test & not an improvement.

> camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Test
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093331#comment-13093331 ] 

Mathieu Lalonde edited comment on CAMEL-4332 at 8/30/11 12:17 AM:
------------------------------------------------------------------

Please ignore the previous patch and use this contribution instead.

      was (Author: mrlalonde):
    Please ignore the previous patch and use this one instead.
  
> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Priority: Trivial
>             Fix For: Future
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathieu Lalonde updated CAMEL-4332:
-----------------------------------

    Fix Version/s:     (was: Future)
                   2.9.0

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathieu Lalonde reassigned CAMEL-4332:
--------------------------------------

    Assignee: Mathieu Lalonde

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathieu Lalonde updated CAMEL-4332:
-----------------------------------

    Attachment: camel-nagios_test-contribution.tar

Please ignore the previous patch and use this one instead.

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Priority: Trivial
>             Fix For: Future
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathieu Lalonde updated CAMEL-4332:
-----------------------------------

    Attachment: camel-nagios_test-patch.tar

Here is unit test that shows that this is already working.

The patch was generated with svn diff and 
the tar can be opened in the camel-nagios project directory; it has a src/test/data/tmpdir to be use for the test.

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Priority: Trivial
>             Fix For: Future
>
>         Attachments: camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094166#comment-13094166 ] 

Mathieu Lalonde commented on CAMEL-4332:
----------------------------------------

Thanks for the feedback.  I will also take into account your comment from CAMEL-4393, including it in the code & re-factoring a little to remove some duplication.

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Work started] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-4332 started by Mathieu Lalonde.

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4332) camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093572#comment-13093572 ] 

Claus Ibsen commented on CAMEL-4332:
------------------------------------

Please use "target" for tmp dir. That is what we usually do.

And there is a deleteDirectory in the camel test kit, so we usually delete the target/foo directory in the setup.

> camel-nagios - Use Camel type converter to convert message body to String before sending to Nagios
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4332) camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4332.
--------------------------------

    Resolution: Not A Problem
    
> camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Test
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar, camel-nagios_test_polished.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4332) camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios

Posted by "Mathieu Lalonde (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathieu Lalonde updated CAMEL-4332:
-----------------------------------

    Attachment: camel-nagios_test_polished.tar

Attached additional unit test based on earlier feedback.

Added NagiosFileToStringTest along with  NagiosTestSupport abstract class to make it clear why we are deliberately skipping test when we can't setup the nagios stub.

Polished other tests to extend NagiosTestSupport.

Some (but not all) classes were using a different ports for the nagios stub, they now all use the same port.  I could re-adjust this if required.


> camel-nagios - test that we use Camel type converter to convert message body to String before sending to Nagios
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4332
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4332
>             Project: Camel
>          Issue Type: Test
>            Reporter: Claus Ibsen
>            Assignee: Mathieu Lalonde
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: camel-nagios_test-contribution.tar, camel-nagios_test-patch.tar, camel-nagios_test_polished.tar
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Sending-Nagios-Passive-Checks-from-Spring-HowTo-tp4694564p4694564.html
> If people route a payload which is not already a String, we should convert that to a String beforehand sending to Nagios.
> In the nabble link the user routes from file -> nagios. And thus the payload is a java.io.File instead.
> All needed is to use the Camel type converter to convert to String first.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira