Skip to content

process

Process Manager for Suricata processes and sub-processes.

To import...

from dynamite_nsm.services.suricata import process as suricata_process

CallSuricataProcessError

__init__(self, message) special

Thrown when suricata process encounters an error state

Parameters:

Name Type Description Default
message

A more specific error message

required

Returns:

Type Description

None

Source code in dynamite_nsm/services/suricata/process.py
def __init__(self, message):
    """Thrown when suricata process encounters an error state
    Args:
        message: A more specific error message
    Returns:
        None
    """
    msg = "An error occurred while calling suricata process: {}".format(message)
    super(CallSuricataProcessError, self).__init__(msg)

ProcessManager

__init__(self, stdout=True, verbose=False, pretty_print_status=False) special

Manage Suricata processes and sub-processes

Parameters:

Name Type Description Default
stdout Optional[bool]

Print output to console

True
verbose Optional[bool]

Include detailed debug messages

False
pretty_print_status Optional[bool]

If true, status will be printed in a tabular form

False
Source code in dynamite_nsm/services/suricata/process.py
def __init__(self, stdout: Optional[bool] = True, verbose: Optional[bool] = False,
             pretty_print_status: Optional[bool] = False):
    """Manage Suricata processes and sub-processes
    Args:
        stdout: Print output to console
        verbose: Include detailed debug messages
        pretty_print_status: If true, status will be printed in a tabular form
    """
    process.BaseProcessManager.__init__(self, 'suricata.service', 'suricata.process', log_path=None,
                                        stdout=stdout, verbose=verbose, pretty_print_status=pretty_print_status)
    if not profile.ProcessProfiler().is_installed():
        raise exceptions.CallProcessError("Suricata is not installed.")