Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fortios_system_ha monitor property #316

Open
mathieubrun opened this issue Feb 23, 2024 · 2 comments
Open

fortios_system_ha monitor property #316

mathieubrun opened this issue Feb 23, 2024 · 2 comments

Comments

@mathieubrun
Copy link

Hello,

I'm using the 1.19.0 terraform provider to set ha monitor settings.

Setting the monitor property to "internal2 internal5 internal6" works as expected, the 3 interfaces are now monitored :

config system ha
set group-name "xxxxxxxx"
set mode a-p
set password ENC xxxxxxxxxxxxxxxxxxxxxx
set hbdev "internal5" 200 "internal6" 0
set override disable
set priority 200
set monitor "internal2" "internal5" "internal6"
end

However, running a terraform plan returns the following changes:

~ resource "fortios_system_ha" "this" {
      id                               = "SystemHa"
    ~ monitor                          = "\"internal2\" \"internal5\" \"internal6\"  \"internal2\" \"internal5\" \"internal6\"  \"internal2\" \"internal5\" \"internal6\" " -> "internal2 internal5 internal6"
      # (66 unchanged attributes hidden)
      # (1 unchanged block hidden)
  }

In order to avoid plan/apply infinite loop, trying to set the value to \"internal2\" \"internal5\" \"internal6\" \"internal2\" \"internal5\" \"internal6\" \"internal2\" \"internal5\" \"internal6\" yields the following error:

│ Error: Error updating SystemHa resource: Internal Server Error - Internal error when processing the request (500)
│ Cli response:
│ node_check_object fail! for hbdev internal5
│ node_check_object fail! for hbdev internal6
│ Invalid value internal5
│ Invalid value internal6
│ No permisson to change HA setting
│ object check operator error, -37, discard the setting
│ Command fail. Return code -37
@MaxxLiu22
Copy link

Hi @mathieubrun ,

Thank you for raising this issue, it looks like API returns an abnormal monitor data, I have reported it to the API team for investigating. sorry for any inconvenience

Thanks,
Maxx

@mathieubrun
Copy link
Author

Hello,

Thanks for the feedback !

For information, here is the result of GET call on /api/v2/cmdb/system/ha :

"monitor": [
    {
        "q_origin_key": "internal2",
        "name": "internal2",
        "datasource": "system.interface"
    },
    {
        "q_origin_key": "internal5",
        "name": "internal5",
        "datasource": "system.interface"
    },
    {
        "q_origin_key": "internal6",
        "name": "internal6",
        "datasource": "system.interface"
    }
],

Fortios version is 7.0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants