Skip to main content
Solved

PostgreSQL - Change the sql statement output format

  • September 30, 2025
  • 2 replies
  • 22 views

Hassane
Forum|alt.badge.img+2

Hello all,

I use the plugin for postgresql and on the dtailed ouput, i have the message “OK: SQL statement result : 1.”.

I would to change this out in “OK: SQL statement result : Primary.” for example, it will depend of the value.

Thank you in advance,

Hassane

Best answer by vcoum

Hi

You can try with the --change-short-output argument. Add it in the EXTRAOPTIONS service macro

--change-short-output="TOREPLACE~REPLACEDBY~gi"

With your example

--change-short-output="1~Primary~gi"

You can add it multiple times, for each of the values you can get

--change-short-output="1~Primary~gi" --change-short-output="2~Second~gi" 

If you have a lot of differents values, it can be hard to maintain but it will works

Hope it helps

2 replies

vcoum
Centreon Lord Commander
Forum|alt.badge.img+13
  • Centreon Lord Commander
  • 137 replies
  • Answer
  • September 30, 2025

Hi

You can try with the --change-short-output argument. Add it in the EXTRAOPTIONS service macro

--change-short-output="TOREPLACE~REPLACEDBY~gi"

With your example

--change-short-output="1~Primary~gi"

You can add it multiple times, for each of the values you can get

--change-short-output="1~Primary~gi" --change-short-output="2~Second~gi" 

If you have a lot of differents values, it can be hard to maintain but it will works

Hope it helps


Hassane
Forum|alt.badge.img+2
  • Author
  • Steward *
  • 2 replies
  • October 1, 2025

Merely Thank You ​@vcoum