Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
When we would like to display the list of commands in centreon using the REST API, sometimes the parameter line is a string, sometimes the parameter line is an array. If the command line contains the character | (pipe), then the line parameter is an array. Otherwise it's a string.
Steps to Reproduce
I logged in Centreon
I created two commands:
One with name test1, any type and command line: test
Second one with name test2, any type and command line: test | test
I got an auth token from the API
I use the API with object CMD, action SHOW and argurment the name of the command above.
Describe the received result
I assume that env variable CENTREON_TOKEN contains the auth token to the API and CENTREON_URL contains the URL to centreon.
The issue seems to be due to this piece of code. If I comment this code, it works correctly. But I don't know the side effect for the rest of the API ...
BUG REPORT INFORMATION
Prerequisites
Versions
Operating System
Browser used
Version: 67.0.2 (64 bits)
Additional environment details (AWS, VirtualBox, physical, etc.):
Inside VirtualBox, ovf from centreon website.
Description
When we would like to display the list of commands in centreon using the REST API, sometimes the parameter line is a string, sometimes the parameter line is an array. If the command line contains the character | (pipe), then the line parameter is an array. Otherwise it's a string.
Steps to Reproduce
Describe the received result
I assume that env variable CENTREON_TOKEN contains the auth token to the API and CENTREON_URL contains the URL to centreon.
Describe the expected result