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

Configurations - Hierarchy configurations #267

Closed
SYNchroACK opened this issue Jul 10, 2015 · 14 comments
Closed

Configurations - Hierarchy configurations #267

SYNchroACK opened this issue Jul 10, 2015 · 14 comments
Labels
component: configuration feature Indicates new feature requests or new features
Milestone

Comments

@SYNchroACK
Copy link
Contributor

  • generic
  • bot type
  • bots
@SYNchroACK SYNchroACK added bug Indicates an unexpected problem or unintended behavior feature Indicates new feature requests or new features labels Jul 10, 2015
@SYNchroACK SYNchroACK self-assigned this Jul 10, 2015
@SYNchroACK SYNchroACK added this to the Release 1 milestone Jul 10, 2015
@sebix
Copy link
Member

sebix commented Aug 26, 2015

Could you please expand the description of this issue? It is totally unclear what is meant here.

@SYNchroACK
Copy link
Contributor Author

The idea is remove the defaults.conf file and have the runtime.conf in the following format:

Current config:

{
    "malware-domain-list-collector": {
        "error_procedure": "retry",
        "error_retry_delay": 30,
        "error_log_message": true,
        "error_dump_message": true,
        "url": "http://www.malwaredomainlist.com/updatescsv.php",
        "feed": "Malware Domain List",
        "rate_limit": 3600
    },
    "malware-domain-list-parser": {
        "error_procedure": "pass",
        "error_retry_delay": 30,
        "error_log_message": true,
        "error_dump_message": true
    },
    "file-output": {
        "error_procedure": "retry",
        "error_retry_delay": 30,
        "error_log_message": true,
        "error_dump_message": true,
        "file": "/opt/intelmq/var/lib/bots/file-output/events.txt"
    }
}

Proposal:

{
    "__default__": {
        "broker": "redis",
        "error_procedure": "retry",
        "error_max_retries": 3,
        "error_log_message": true,
        "error_log_exception": true,
        "error_dump_message": true,
        "error_retry_delay": 15,
        "exit_on_stop": true,
        "rate_limit": 0,
        "load_balance": false,
        "source_pipeline_host": "127.0.0.1",
        "source_pipeline_port": "6379",
        "source_pipeline_db": "2",
        "destination_pipeline_host": "127.0.0.1",
        "destination_pipeline_port": "6379",
        "destination_pipeline_db": "2",
        "http_proxy": null,
        "https_proxy": null,
        "http_user_agent": null
    },
    "Collectors": {
        "__default__": {
            "error_procedure": "pass",
            "error_retry_delay": 1000,
            "error_log_message": false,
            "error_dump_message": false,
        },
        "malware-domain-list-collector": {
            "error_procedure": "retry",
            "error_retry_delay": 30,
            "error_log_message": true,
            "error_dump_message": true,
            "url": "http://www.malwaredomainlist.com/updatescsv.php",
            "feed": "Malware Domain List",
            "rate_limit": 3600
        }
    },
    "Parsers": {
        "__default__": {
            "error_procedure": "retry",
            "error_retry_delay": 2323,
            "error_log_message": false,
            "error_dump_message": true,
        },
        "malware-domain-list-parser": {
            "error_procedure": "pass",
            "error_retry_delay": 30,
            "error_log_message": true,
            "error_dump_message": true
        }
    },
    "Outputs": {
        "__default__": {
            "error_procedure": "pass",
            "error_retry_delay": 9999,
            "error_log_message": true,
            "error_dump_message": false,
        },
        "file-output": {
            "error_procedure": "retry",
            "error_retry_delay": 30,
            "error_log_message": true,
            "error_dump_message": true,
            "file": "/opt/intelmq/var/lib/bots/file-output/events.txt"
        }
    }
}

@sebix
Copy link
Member

sebix commented Aug 26, 2015

Sounds reasonable for me. +1

@SYNchroACK
Copy link
Contributor Author

A little more context information...

Explanation:

  • Generic parameters values will be overwritten by the specific parameters.

Example:

  • If a bot starts and load the parameter 'rate_limit: 0' in the 'default' global section, but that bot is the 'malware-domain-list-collector', the 'rate_limit: 0' will be overwritten by 'rate_limit: 3600'.

@SYNchroACK SYNchroACK assigned sebix and unassigned SYNchroACK Sep 11, 2015
@sebix
Copy link
Member

sebix commented Sep 14, 2015

Will be postponed as this needs also changes in intelmq-manager and @mauroasilva is not available currently.

@SYNchroACK SYNchroACK modified the milestones: Release 2 - v1.1, Release 1 - v1.0 Oct 9, 2015
@sebix
Copy link
Member

sebix commented Mar 7, 2016

@robcza @aaronkaplan @dmth

I want to bring this up again. Do we want this change for 1.0, 1.1 or 2.0? It does make sense to apply it now, because doing the change in 1.1, we must allow both configurations for backwards-compatibility. This would be error-prone for both the users and in code.

Working on 1.0 we can still break compatibility.

@sebix sebix modified the milestones: Release 1 - v1.0, Release 2 - v1.1 Apr 13, 2016
@aaronkaplan aaronkaplan modified the milestones: Release v1.1, Release v1.0 Jul 25, 2016
@aaronkaplan
Copy link
Member

Basically we are talking about inheritance (object orient programming inheritance) here.

@sebix
Copy link
Member

sebix commented Jul 28, 2016

For 1.0 we could easily remove system.conf and move the 2 values to defaults.conf. Then we get at least rid of one of the files.

Migration path: Until 1.0 we still read the system.conf, (if it exists) but emit a warning. In 1.0 we remove it entirely.

@sebix
Copy link
Member

sebix commented Sep 14, 2016

Next step before 1.0 could be: remove startup.conf and move the values into runtime.conf. On intelmq-side this is trivial, for the manager (I guess) too. What do you think?

The bots themselves do not depend on it, it's only the ctl-tool which uses/reads it.

@aaronkaplan
Copy link
Member

On 14 Sep 2016, at 12:53, Sebastian [email protected] wrote:

Next step before 1.0 could be: remove startup.conf and move the values into runtime.conf. On intelmq-side this is trivial, for the manager (I guess) too. What do you think?

+1

@aaronkaplan
Copy link
Member

aaronkaplan commented Oct 5, 2016

Revisiting this issue : how does it play together with our idea of splitting up the config into snippets for each bot in a conf.d/* directory structure? Does that play into this issue or do you want to keep it separate? For me this thread is not very clearly defined right now.

Are we talking about only inheritance of values of a config?
Are we talking about the conf.d/* changes as well?
Are we talking only about moving startup.conf into runtime.conf ?

It's not 100% clear how the config part of intelmq shall look like in the future? (by which deadline now)?

sebix added a commit that referenced this issue Oct 5, 2016
#267

Signed-off-by: Sebastian Wagner <[email protected]>
@sebix sebix assigned ghost and unassigned sebix Jan 16, 2017
@vince-nayal
Copy link
Contributor

Hi,
Is @SYNchroACK config proposal usable in the current realease ?

@SYNchroACK
Copy link
Contributor Author

@vince-nayal still not implemented, unfortunately

@ghost ghost removed the bug Indicates an unexpected problem or unintended behavior label Aug 17, 2017
@ghost ghost modified the milestones: 1.1.0, 1.2.0 Jun 28, 2018
@ghost ghost modified the milestones: 1.2.0, 2.0.0, 2.1.0 Apr 9, 2019
@ghost ghost modified the milestones: 2.1.0, 2.2.0 Oct 25, 2019
@ghost ghost removed this from the 2.2.0 milestone Jun 17, 2020
@ghost
Copy link

ghost commented Jul 15, 2020

The configuration has been revisited since the creation of the issue (removal of system.conf and startup.conf). Issue is staled since 3 years, so closing now.

@ghost ghost closed this as completed Jul 15, 2020
@ghost ghost added this to the 1.0.0 milestone Jul 15, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: configuration feature Indicates new feature requests or new features
Projects
None yet
Development

No branches or pull requests

4 participants