Skip to main content
Solved

Request SQL

  • May 30, 2022
  • 5 replies
  • 592 views

Forum|alt.badge.img+1

Hello,

I would like to send a sql query to a database and get the value (using a select count etc...) I can do it from the 'command line' but from the web interface I am completely lost
Thanks for your help

Best answer by coco163

--sql-statement should be between double quotes

 

--sql-statement=”select count(*)...;”

5 replies

coco163
Forum|alt.badge.img+11
  • Steward ***
  • May 30, 2022

if you are familiar with the command line, then just create a new check command.

After that simply create a service with the command you created.

Share of to us and we will guide you to define the macros


Forum|alt.badge.img+1
  • Author
  • Steward *
  • May 31, 2022

here is the command that I execute but when I create a new command in the web interface with the same command it marks me (Execute Command failed)

 


coco163
Forum|alt.badge.img+11
  • Steward ***
  • Answer
  • May 31, 2022

--sql-statement should be between double quotes

 

--sql-statement=”select count(*)...;”


Forum|alt.badge.img+1
  • Steward *
  • December 27, 2024

I use oracle as database even after double quotes it still says table or view does not exists


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • December 27, 2024

@ganesh have you used the oracle specific connector?

https://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-databases-oracle/

https://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-databases-oracle/#prerequisites

 

/usr/lib/centreon/plugins/centreon_oracle.pl \
--plugin=database::oracle::plugin \
--hostname='10.0.0.1' \
--help