Пример #1
0
import aws_bootstrap_env

import splunk.admin as admin
from splunktalib.rest_manager import multimodel
import aws_settings_base_rh


class AWSLogsSettings(aws_settings_base_rh.AWSLogging):
    keyMap = {'level': 'log_level'}


class S3IncrementalSettings(multimodel.MultiModel):
    endpoint = 'configs/conf-aws_settings'
    modelMap = {
        'splunk_ta_aws_logs': AWSLogsSettings,
    }


if __name__ == '__main__':
    admin.init(
        multimodel.ResourceHandler(S3IncrementalSettings),
        admin.CONTEXT_APP_AND_USER,
    )
Пример #2
0
import aws_bootstrap_env

import splunk.admin as admin
from splunktalib.rest_manager import multimodel
import aws_settings_base_rh


class SQSLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {'level': 'log_level'}


class SQSSettings(multimodel.MultiModel):
    endpoint = "configs/conf-aws_sqs"
    modelMap = {
        'logging': SQSLogging,
    }


if __name__ == "__main__":
    admin.init(
        multimodel.ResourceHandler(SQSSettings),
        admin.CONTEXT_APP_AND_USER,
    )
Пример #3
0
import aws_bootstrap_env
import os
import sys
import re


import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class CloudWatchLogsLogging(aws_settings_base_rh.AWSLogging):
    keyMap          = {
                      'level': 'log_level'
                      }


class CloudWatchLogsSettings(multimodel.MultiModel):
    endpoint    = "configs/conf-aws_cloudwatch_logs"
    modelMap    = {
                  'logging': CloudWatchLogsLogging,
                  }


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(CloudWatchLogsSettings), admin.CONTEXT_APP_AND_USER)
Пример #4
0
import aws_bootstrap_env

import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class BillingCurLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {"level": "log_level"}


class BillingCurSettings(multimodel.MultiModel):
    endpoint = "configs/conf-aws_settings"
    modelMap = {
        "logging": BillingCurLogging,
    }


class BillingCurSettingsHandler(aws_settings_base_rh.AWSSettingHandler):
    stanzaName = 'aws_billing_cur'


if __name__ == "__main__":
    admin.init(
        multimodel.ResourceHandler(BillingCurSettings,
                                   BillingCurSettingsHandler),
        admin.CONTEXT_APP_AND_USER)
import aws_bootstrap_env
import os
import sys
import re

import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class BillingSettingHandler(aws_settings_base_rh.AWSSettingHandler):
    stanzaName = 'aws_billing'


if __name__ == "__main__":
    admin.init(
        multimodel.ResourceHandler(aws_settings_base_rh.AWSSettings,
                                   handler=BillingSettingHandler),
        admin.CONTEXT_APP_AND_USER)
Пример #6
0
import aws_bootstrap_env

import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class DescriptionLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {"level": "log_level"}


class DescriptionSettings(multimodel.MultiModel):
    endpoint = "configs/conf-aws_description"
    modelMap = {
        "logging": DescriptionLogging,
    }


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(DescriptionSettings),
               admin.CONTEXT_APP_AND_USER)
Пример #7
0
import aws_bootstrap_env
import splunk.admin as admin

from splunktalib.rest_manager import multimodel
# from splunktalib.rest_manager import base

import aws_settings_base_rh


class InspectorLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {'level': 'log_level'}


# class InspectorGlobalSettings(base.BaseModel):
#    optionalArgs = {'use_hec'}


class InspectorSettings(multimodel.MultiModel):
    endpoint = "configs/conf-aws_inspector"
    modelMap = {
        'logging': InspectorLogging,
    }


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(InspectorSettings),
               admin.CONTEXT_APP_AND_USER)
import aws_bootstrap_env

import splunk.admin as admin
from splunktalib.rest_manager import multimodel
import aws_settings_base_rh


class CloudWatchLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {'level': 'log_level'}


class CloudWatchSettings(multimodel.MultiModel):
    endpoint = 'configs/conf-aws_cloudwatch'
    modelMap = {
        'logging': CloudWatchLogging,
    }


if __name__ == '__main__':
    admin.init(
        multimodel.ResourceHandler(CloudWatchSettings),
        admin.CONTEXT_APP_AND_USER,
    )
import aws_bootstrap_env
import os
import sys
import re

import splunk.admin as admin

from splunktalib.rest_manager import base, multimodel, normaliser, validator


class AWSConnection(base.BaseModel):
    requiredArgs = {'is_secure'}
    defaultVals = {'is_secure': '1'}
    normalisers = {'is_secure': normaliser.Boolean()}
    validators = {'is_secure': validator.Enum(('0', '1'))}

    outputExtraFields = ('eai:acl', 'acl', 'eai:appName', 'eai:userName')


class Globals(multimodel.MultiModel):
    endpoint = "configs/conf-aws_global_settings"
    modelMap = {
        'aws_connection': AWSConnection,
    }


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(Globals), admin.CONTEXT_APP_AND_USER)
import aws_bootstrap_env

import splunk.admin as admin
from splunktalib.rest_manager import multimodel
import aws_settings_base_rh


class KinesisLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {'level': 'log_level'}


class KinesisSettings(multimodel.MultiModel):
    endpoint = "configs/conf-aws_kinesis"
    modelMap = {
        'logging': KinesisLogging,
    }


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(KinesisSettings),
               admin.CONTEXT_APP_AND_USER)
import aws_bootstrap_env
import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class ConfigRuleLogging(aws_settings_base_rh.AWSLogging):
    keyMap = {
        'level': 'log_level'
    }


class ConfigRuleSettings(multimodel.MultiModel):
    endpoint = "configs/conf-aws_config_rule"
    modelMap = {
        'logging': ConfigRuleLogging,
    }


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(ConfigRuleSettings), admin.CONTEXT_APP_AND_USER)
Пример #12
0
import aws_bootstrap_env
import os
import sys
import re

import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class S3SettingHandler(aws_settings_base_rh.AWSSettingHandler):
    stanzaName = 'aws_s3'


if __name__ == "__main__":
    admin.init(multimodel.ResourceHandler(aws_settings_base_rh.AWSSettings, handler=S3SettingHandler), admin.CONTEXT_APP_AND_USER)
import aws_bootstrap_env

import splunk.admin as admin

from splunktalib.rest_manager import multimodel

import aws_settings_base_rh


class SQSBasedS3Logging(aws_settings_base_rh.AWSLogging):
    keyMap = {
        'level': 'log_level'
    }


class SQSBasedS3Settings(multimodel.MultiModel):
    endpoint = 'configs/conf-aws_settings'
    modelMap = {
        'logging': SQSBasedS3Logging,
    }


class SQSBasedS3SettingsHandler(aws_settings_base_rh.AWSSettingHandler):
    stanzaName = 'aws_sqs_based_s3'

if __name__ == '__main__':
    admin.init(
        multimodel.ResourceHandler(SQSBasedS3Settings, SQSBasedS3SettingsHandler),
        admin.CONTEXT_APP_AND_USER,
    )