Ad Widget

Collapse

Error: "Field 'formula' doesn't have a default value" when Creating Trigger Action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sasanaalem
    Junior Member
    • Sep 2023
    • 28

    #1

    Error: "Field 'formula' doesn't have a default value" when Creating Trigger Action

    Hi everyone,

    I'm encountering an issue while trying to create a trigger action in Zabbix. Despite filling in all the required fields, I'm receiving the following error message:

    Code:
    Error in query [INSERT INTO actions (actionid,name,status,eventsource,esc_period,pause_symptoms,pause_suppressed,notify_if_canceled,evaltype) VALUES ('24','s','0','0','1h','1','1','1','0')] [Field 'formula' doesn't have a default value] [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerActionCreate->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAction->create() → DB::insert() → DB::insertBatch() → DBexecute() → trigger_error() in include/db.inc.php:367]
    SQL statement execution has failed "INSERT INTO actions (actionid,name,status,eventsource,esc_period,pause_symptoms,pause_suppressed,notify_if_canceled,evaltype) VALUES ('24','s','0','0','1h','1','1','1','0')".
    It seems like the database is expecting a value for the 'formula' field, even though I'm not using it and it’s not marked as required in the interface. Steps to Reproduce:
    1. Navigated to Configuration > Actions > Trigger Actions.
    2. Clicked "Create Action."
    3. Filled out all required fields (name, status, etc.).
    4. Clicked "Add."
    Details:
    • Zabbix Version: 6.4.15
    • Database: mysql
    Questions:
    • Has anyone encountered this issue before?
    • Is this a bug, or am I missing something in the configuration?
    • Is there a workaround or a specific configuration that I need to apply to avoid this error?

    Any guidance would be greatly appreciated!

    Thanks in advance for your help.
  • sasanaalem
    Junior Member
    • Sep 2023
    • 28

    #2
    Does anyone have any idea?

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #3
      " even though I'm not using it and it’s not marked as required in the interface."
      Can you explain a bit ? To what you have set your "Type of calculation" ? Custom? and left it empty?
      API descriptions are helpful in many cases..
      formula string User-defined expression to be used for evaluating conditions of filters with a custom expression. The expression must contain IDs that reference specific filter conditions by its formulaid. The IDs used in the expression must exactly match the ones defined in the filter conditions: no condition can remain unused or omitted.

      Property behavior:
      - required if evaltype is set to "custom expression"

      Comment

      Working...