1. Packages
  2. Routeros Provider
  3. API Docs
  4. SystemLogging
routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros

routeros.SystemLogging

Explore with Pulumi AI

routeros logo
routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const logSnmpDisk = new routeros.SystemLogging("logSnmpDisk", {
        action: "disk",
        topics: ["snmp"],
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    log_snmp_disk = routeros.SystemLogging("logSnmpDisk",
        action="disk",
        topics=["snmp"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := routeros.NewSystemLogging(ctx, "logSnmpDisk", &routeros.SystemLoggingArgs{
    			Action: pulumi.String("disk"),
    			Topics: pulumi.StringArray{
    				pulumi.String("snmp"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Routeros = Pulumi.Routeros;
    
    return await Deployment.RunAsync(() => 
    {
        var logSnmpDisk = new Routeros.SystemLogging("logSnmpDisk", new()
        {
            Action = "disk",
            Topics = new[]
            {
                "snmp",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.SystemLogging;
    import com.pulumi.routeros.SystemLoggingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var logSnmpDisk = new SystemLogging("logSnmpDisk", SystemLoggingArgs.builder()
                .action("disk")
                .topics("snmp")
                .build());
    
        }
    }
    
    resources:
      logSnmpDisk:
        type: routeros:SystemLogging
        properties:
          action: disk
          topics:
            - snmp
    

    Create SystemLogging Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SystemLogging(name: string, args: SystemLoggingArgs, opts?: CustomResourceOptions);
    @overload
    def SystemLogging(resource_name: str,
                      args: SystemLoggingArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SystemLogging(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      action: Optional[str] = None,
                      ___id_: Optional[float] = None,
                      ___path_: Optional[str] = None,
                      disabled: Optional[bool] = None,
                      prefix: Optional[str] = None,
                      regex: Optional[str] = None,
                      system_logging_id: Optional[str] = None,
                      topics: Optional[Sequence[str]] = None)
    func NewSystemLogging(ctx *Context, name string, args SystemLoggingArgs, opts ...ResourceOption) (*SystemLogging, error)
    public SystemLogging(string name, SystemLoggingArgs args, CustomResourceOptions? opts = null)
    public SystemLogging(String name, SystemLoggingArgs args)
    public SystemLogging(String name, SystemLoggingArgs args, CustomResourceOptions options)
    
    type: routeros:SystemLogging
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SystemLoggingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SystemLoggingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SystemLoggingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SystemLoggingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SystemLoggingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SystemLogging Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SystemLogging resource accepts the following input properties:

    Action string
    specifies one of the system default actions or user specified action listed in actions menu
    Disabled bool
    Prefix string
    prefix added at the beginning of log messages
    Regex string
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    SystemLoggingId string
    The ID of this resource.
    Topics List<string>
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Action string
    specifies one of the system default actions or user specified action listed in actions menu
    Disabled bool
    Prefix string
    prefix added at the beginning of log messages
    Regex string
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    SystemLoggingId string
    The ID of this resource.
    Topics []string
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    action String
    specifies one of the system default actions or user specified action listed in actions menu
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    disabled Boolean
    prefix String
    prefix added at the beginning of log messages
    regex String
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    systemLoggingId String
    The ID of this resource.
    topics List<String>
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    action string
    specifies one of the system default actions or user specified action listed in actions menu
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    disabled boolean
    prefix string
    prefix added at the beginning of log messages
    regex string
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    systemLoggingId string
    The ID of this resource.
    topics string[]
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    action str
    specifies one of the system default actions or user specified action listed in actions menu
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    disabled bool
    prefix str
    prefix added at the beginning of log messages
    regex str
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    system_logging_id str
    The ID of this resource.
    topics Sequence[str]
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    action String
    specifies one of the system default actions or user specified action listed in actions menu
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    disabled Boolean
    prefix String
    prefix added at the beginning of log messages
    regex String
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    systemLoggingId String
    The ID of this resource.
    topics List<String>
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SystemLogging resource produces the following output properties:

    Default bool
    It's the default item.
    Id string
    The provider-assigned unique ID for this managed resource.
    Invalid bool
    Default bool
    It's the default item.
    Id string
    The provider-assigned unique ID for this managed resource.
    Invalid bool
    default_ Boolean
    It's the default item.
    id String
    The provider-assigned unique ID for this managed resource.
    invalid Boolean
    default boolean
    It's the default item.
    id string
    The provider-assigned unique ID for this managed resource.
    invalid boolean
    default bool
    It's the default item.
    id str
    The provider-assigned unique ID for this managed resource.
    invalid bool
    default Boolean
    It's the default item.
    id String
    The provider-assigned unique ID for this managed resource.
    invalid Boolean

    Look up Existing SystemLogging Resource

    Get an existing SystemLogging resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SystemLoggingState, opts?: CustomResourceOptions): SystemLogging
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            action: Optional[str] = None,
            default: Optional[bool] = None,
            disabled: Optional[bool] = None,
            invalid: Optional[bool] = None,
            prefix: Optional[str] = None,
            regex: Optional[str] = None,
            system_logging_id: Optional[str] = None,
            topics: Optional[Sequence[str]] = None) -> SystemLogging
    func GetSystemLogging(ctx *Context, name string, id IDInput, state *SystemLoggingState, opts ...ResourceOption) (*SystemLogging, error)
    public static SystemLogging Get(string name, Input<string> id, SystemLoggingState? state, CustomResourceOptions? opts = null)
    public static SystemLogging get(String name, Output<String> id, SystemLoggingState state, CustomResourceOptions options)
    resources:  _:    type: routeros:SystemLogging    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string
    specifies one of the system default actions or user specified action listed in actions menu
    Default bool
    It's the default item.
    Disabled bool
    Invalid bool
    Prefix string
    prefix added at the beginning of log messages
    Regex string
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    SystemLoggingId string
    The ID of this resource.
    Topics List<string>
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Action string
    specifies one of the system default actions or user specified action listed in actions menu
    Default bool
    It's the default item.
    Disabled bool
    Invalid bool
    Prefix string
    prefix added at the beginning of log messages
    Regex string
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    SystemLoggingId string
    The ID of this resource.
    Topics []string
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    action String
    specifies one of the system default actions or user specified action listed in actions menu
    default_ Boolean
    It's the default item.
    disabled Boolean
    invalid Boolean
    prefix String
    prefix added at the beginning of log messages
    regex String
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    systemLoggingId String
    The ID of this resource.
    topics List<String>
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    action string
    specifies one of the system default actions or user specified action listed in actions menu
    default boolean
    It's the default item.
    disabled boolean
    invalid boolean
    prefix string
    prefix added at the beginning of log messages
    regex string
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    systemLoggingId string
    The ID of this resource.
    topics string[]
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    action str
    specifies one of the system default actions or user specified action listed in actions menu
    default bool
    It's the default item.
    disabled bool
    invalid bool
    prefix str
    prefix added at the beginning of log messages
    regex str
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    system_logging_id str
    The ID of this resource.
    topics Sequence[str]
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    action String
    specifies one of the system default actions or user specified action listed in actions menu
    default Boolean
    It's the default item.
    disabled Boolean
    invalid Boolean
    prefix String
    prefix added at the beginning of log messages
    regex String
    Regex which will be used in order to match or not match message. If the regex is not matched, then even if topic is configured to be logged, but log message does not match regex, action will not be performed.
    systemLoggingId String
    The ID of this resource.
    topics List<String>
    log all messages that falls into specified topic or list of topics. '!' character can be used before topic to exclude messages falling under this topic. For example, we want to log NTP debug info without too much details: /system logging add topics=ntp,debug,!packet

    Import

    The ID can be found via API or the terminal

    The command for the terminal is -> :put [/system/logging/print get [print show-ids]]

    $ pulumi import routeros:index/systemLogging:SystemLogging log_snmp_disk "*4"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    routeros terraform-routeros/terraform-provider-routeros
    License
    Notes
    This Pulumi package is based on the routeros Terraform Provider.
    routeros logo
    routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros