Code Monkey home page Code Monkey logo

guard-project / cb-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 24.16 MB

APIs to interact with the Context Broker's database. Through a REST Interface, it exposes data and events stored in the internal storage system in a structured way. It provides uniform access to the capabilities of monitoring agents.

Home Page: https://guard-cb-manager.readthedocs.io

License: MIT License

Python 99.34% Shell 0.66%
agent beats control data ebpf elasticsearch log logstash management programmability security

cb-manager's People

Contributors

alexcarrega avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cb-manager's Issues

Error response while modifying list configuration parameter

When calling PUT /instance/agent/<agent-id> to modify parameter that is a list configuration is modified properly but error is returned.
LCP shows no errors.

Example message

{
    "id": "pgafilter@backend-prod",
    "operations": {
        "parameters": [
            {
            "id": "rules",
            "value": ["ip1", "ip3", "ip4"]
            }
        ]
    }
}

CB output

[
    {
        "code": 422,
        "error": true,
        "lcp_response": [
            {
                "code": 422,
                "error": true,
                "exception": {
                    "filename": "/opt/cb-manager/resource/agent/handler/lcp.py",
                    "line": 81,
                    "reason": "RequestError(400, 'mapper_parsing_exception', 'object mapping for [parameters.value] tried to parse field [null] as object, but found a concrete value')"
                },
                "message": "Response from LCP([email protected]:4000) not valid",
                "status": "Unprocessable Entity"
            }
        ],
        "message": "Not possible to update a agent instance with the id=pgafilter@backend-prod",
        "status": "Unprocessable Entity"
    }
]

/instance/agent when updating configuration (resource) HTTP Error code 422

Very similar to #3

Request to:

PUT http://guard3.westeurope.cloudapp.azure.com:5000/instance/agent/pgafilter@backend-prod

with content:

{
    "id": "pgafilter@backend-prod",
    "operations": {
        "resources": [
            {
            "content": "some text",
            "id": "rule-file"
            }
        ]
    }
}

gets a response:

[
  {
    "code": 422,
    "error": true,
    "lcp_response": [
      {
        "code": 422,
        "error": true,
        "exception": {
          "filename": "/opt/cb-manager/resource/agent/handler/lcp.py",
          "line": 81,
          "reason": "{'resources': [ValidationException({'path': [ValidationException('Value required for this field.')], 'content': [ValidationException('Value required for this field.')]})]}"
        },
        "message": "Response from LCP([email protected]:4000) not valid",
        "status": "Unprocessable Entity"
      }
    ],
    "message": "Not possible to update a agent instance with the id=pgafilter@backend-prod",
    "status": "Unprocessable Entity"
  }
]

BUT the configuration file gets updated. Maybe this line is a problem?

path = Text(required=True)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.