Icinga2 API - How to append files into an active stage

  • Hello,


    After reading API chapter in the documentation, I have the following understanding:


    Create a package

    Code
    1. POST https://server:5665/v1/config/packages/:package_name

    Add new files

    Code
    1. POST https://panigale:5665/v1/config/stages/:package_name
    2. {
    3. "files": {
    4. ":file_name1" : ":config_file1_content",
    5. ":file_name2" : ":config_file2_content"
    6. }
    7. }


    But if I call it again, a new stage will be created with only the file_name3 :(

    Code
    1. POST https://panigale:5665/v1/config/stages/:package_name
    2. {
    3. "files": {
    4. ":file_name3" : ":config_file3_content"
    5. }
    6. }

    Is there way to add new files to the current actived stage ?


    Cheers,


    Kelson

  • Is that correct to work like this ?



    Concerning packages, what's recommanded to do ?

    1. A package per zone ?
    2. A package per node

    The post was edited 1 time, last by Kels ().

  • OK I will update my API requests, thanks.


    Just to be sure, will we reach some kind of limit size or perfomance issues for REST request if we work only with one package ?

    PHP and Apaches have post max size config vars.