Announcement

Collapse
No announcement yet.

Implementing an sql query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • waelkd
    replied
    Originally posted by vince122 View Post
    find / -name libexec -type d
    i am a bit lost here, the link i use only displays gui, there's no command line or terminal to execute your / -name libexec -type d.


    sorry am asking so many questions , but am very new to this

    Leave a comment:


  • vince122
    replied
    find / -name libexec -type d

    Leave a comment:


  • waelkd
    replied
    Originally posted by vince122 View Post
    Yes, this page corresponds to Nagios commands.

    But before adding it here, you have to go to the Nagios's directory named "libexec" this is where you'll have all your "plugins" (plugin is only the executable file).
    In this directory, you can create an executable file with your query.

    After you created this file, and it works, you go to the Commands page (your screenshot), and you add the file you previously created.

    cant find libexec, mind pointing me to it?

    Leave a comment:


  • vince122
    replied
    Yes, this page corresponds to Nagios commands.

    But before adding it here, you have to go to the Nagios's directory named "libexec" this is where you'll have all your "plugins" (plugin is only the executable file).
    In this directory, you can create an executable file with your query.

    After you created this file, and it works, you go to the Commands page (your screenshot), and you add the file you previously created.

    Leave a comment:


  • waelkd
    replied
    Originally posted by vince122 View Post
    You can do this :

    You create a Nagios's plugin (Like a php, perl or C file) with your query and an output of your data.

    Then, add a Nagios command with /usr/bin/php in prefix and your php file after (in case of php file)
    When Nagios will execute this Command, you will obtain your results as output.
    aHA, ok a quick question if you dont mind, when you say plugin , do you mean commands, like the pic i posted below ?

    http://i.imgur.com/rTVk8.jpg


    if not would you please post the steps.

    thanks


    EDIT: found the plugin tab on the mid left , but theres no add file
    Last edited by waelkd; 4 May 2012, 12:34.

    Leave a comment:


  • vince122
    replied
    You can do this :

    You create a Nagios's plugin (Like a php, perl or C file) with your query and an output of your data.

    Then, add a Nagios command with /usr/bin/php in prefix and your php file after (in case of php file)
    When Nagios will execute this Command, you will obtain your results as output.

    Leave a comment:


  • waelkd
    replied
    I want to execute it in Nagios as i want to check on the stats of it through Nagios. is it possible?


    To make myself more clear ,The company i work with has an SMS server , where they want to implement some SQL quires into your system aka "Nagios". This is why am asking.

    Thanks

    Leave a comment:


  • AkHeNaToN
    replied
    I don't understand your needs !

    Why do you want to execute SQL query in Nagios ?

    Leave a comment:


  • waelkd
    started a topic Implementing an sql query

    Implementing an sql query

    Good day,

    Again , guys i want to implement an sql Date query , something like this

    SELECT * FROM `dt_tb` WHERE month(dt) between '02' and '08' and year(dt) between 2004 and 2005

    My question is where do i place this query in nagios? is there a gui tab i click on and just put the line in it?

    Would very muc appreciate your help.

    Thanks
Working...
X