コード例 #1
0
def _parameter_valuespec_checkpoint_vsx_traffic():
    return Dictionary(elements=[
        (
            "bytes_accepted",
            Levels(
                title=_("Maximum rate of bytes accepted"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="bytes/sec",
            ),
        ),
        (
            "bytes_dropped",
            Levels(
                title=_("Maximum rate of bytes dropped"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="bytes/sec",
            ),
        ),
        (
            "bytes_rejected",
            Levels(
                title=_("Maximum rate of bytes rejected"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="bytes/sec",
            ),
        ),
    ], )
コード例 #2
0
ファイル: fcport_words.py プロジェクト: troelsarvin/checkmk
def _parameter_valuespec_fcport_words():
    return Dictionary(
        title=_("Levels for transmitted and received words"),
        elements=[
            ("fc_tx_words", Levels(title=_("Tx"), unit=_("words/s"))),
            ("fc_rx_words", Levels(title=_("Rx"), unit=_("words/s"))),
        ],
    )
コード例 #3
0
ファイル: gcp_gcs.py プロジェクト: m3rlinux/checkmk
def _vs_function_instances() -> ValueSpec:
    return Dictionary(
        title=_("Levels on instances"),
        elements=[
            ("faas_total_instance_count", Levels(title=_("instances"))),
            ("faas_active_instance_count",
             Levels(title=_("active instances"))),
        ],
    )
コード例 #4
0
def _vs_sql_disk() -> ValueSpec:
    return Dictionary(
        title=_("Levels disk"),
        elements=[
            ("fs_used_percent", Levels(title=_("Disk usage"), unit="%")),
            ("disk_read_ios", Levels(title=_("Number of read IOPS"))),
            ("disk_write_ios", Levels(title=_("Number of write IOPS"))),
        ],
    )
コード例 #5
0
def _vs_function_execution() -> ValueSpec:
    return Dictionary(
        title=_("Levels on performance"),
        elements=[
            ("execution_count", Levels(title=_("execution count"))),
            ("aws_lambda_memory_size_absolute", Levels(title=_("memory"))),
            ("aws_lambda_duration", Levels(title=_("execution time"))),
        ],
    )
コード例 #6
0
def _vs_gcs_bucket_network() -> ValueSpec:
    return Dictionary(
        title=_("Parameters for the bucket network io"),
        elements=[
            ("net_data_sent",
             Levels(title=_("Parameters send bytes"), unit="bytes/s")),
            ("net_data_recv",
             Levels(title=_("Parameters received bytes"), unit="bytes/s")),
        ],
    )
コード例 #7
0
def _vs_function_instances() -> ValueSpec:
    return Dictionary(
        title=_("Levels on instances"),
        elements=[
            ("aws_lambda_provisioned_concurrent_executions",
             Levels(title=_("instances"))),
            ("aws_lambda_concurrent_executions",
             Levels(title=_("active instances"))),
        ],
    )
コード例 #8
0
def _vs_gcs_bucket_objects() -> ValueSpec:
    return Dictionary(
        title=_("Parameters for the bucket objects io"),
        elements=[
            ("aws_bucket_size",
             Levels(title=_("Parameters of total bucket size"), unit="bytes")),
            ("aws_num_objects",
             Levels(title=_("Parameters of bucket object counts"))),
        ],
    )
コード例 #9
0
ファイル: gcp_gcs.py プロジェクト: m3rlinux/checkmk
def _vs_function_execution() -> ValueSpec:
    return Dictionary(
        title=_("Levels on performance"),
        elements=[
            ("faas_execution_count", Levels(title=_("execution count"))),
            ("aws_lambda_memory_size_absolute",
             SimpleLevels(Filesize, title=_("memory"))),
            ("faas_execution_times", Levels(title=_("execution time"),
                                            unit="s")),
        ],
    )
コード例 #10
0
def _vs_run_requests() -> ValueSpec:
    return Dictionary(
        title=_("Levels requests"),
        elements=[
            ("faas_total_instance_count",
             Levels(title=_("Number of running containers"))),
            ("faas_execution_count", Levels(title=_("Number of requests"))),
            ("gcp_billable_time", Levels(title=_("billable time"),
                                         unit="s/s")),
            ("faas_execution_times",
             Levels(title=_("99th percentile request latency"), unit="s")),
        ],
    )
コード例 #11
0
def _parameter_valuespec_checkpoint_vsx_packets():
    return Dictionary(elements=[
        (
            "packets",
            Levels(
                title=_("Maximum rate for total number of packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "packets_accepted",
            Levels(
                title=_("Maximum rate of accepted packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "packets_rejected",
            Levels(
                title=_("Maximum rate of rejected packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "packets_dropped",
            Levels(
                title=_("Maximum rate of dropped packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "packets_logged",
            Levels(
                title=_("Maximum rate of sent logs"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
    ], )
コード例 #12
0
def _vs_gcs_bucket_requests() -> ValueSpec:
    return Dictionary(
        title=_("Parameters for the bucket requests"),
        elements=[("requests",
                   Levels(title=_("Parameters for the bucket requests"),
                          unit="1/second"))],
    )
コード例 #13
0
ファイル: cpu_load.py プロジェクト: troelsarvin/checkmk
def _parameter_valuespec_cpu_load():
    return Transform(
        Dictionary(
            elements=[(
                "levels",
                Levels(
                    help=
                    _("The CPU load of a system is the number of processes currently being "
                      "in the state <u>running</u>, i.e. either they occupy a CPU or wait "
                      "for one. The <u>load average</u> is the averaged CPU load over the last 1, "
                      "5 or 15 minutes. The following levels will be applied on the average "
                      "load. On Linux system the 15-minute average load is used when applying "
                      "those levels. The configured levels are multiplied with the number of "
                      "CPUs, so you should configure the levels based on the value you want to "
                      'be warned "per CPU".'),
                    unit="per core",
                    default_difference=(2.0, 4.0),
                    default_levels=(5.0, 10.0),
                ),
            )],
            optional_keys=False,
        ),
        forth=lambda params: params
        if isinstance(params, dict) else {"levels": params},
    )
コード例 #14
0
ファイル: firewall_if.py プロジェクト: troelsarvin/checkmk
def _parameter_valuespec_firewall_if():
    return Dictionary(
        elements=[
            (
                "ipv4_in_blocked",
                Levels(
                    title=_("Levels for rate of incoming IPv4 packets blocked"),
                    unit=_("pkts/s"),
                    default_levels=(100.0, 10000.0),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "average",
                Integer(
                    title=_("Averaging"),
                    help=_(
                        "When this option is activated then the block rate is being "
                        "averaged <b>before</b> the levels are being applied."
                    ),
                    unit=_("minutes"),
                    default_value=3,
                    minvalue=1,
                    label=_("Compute average over last "),
                ),
            ),
        ],
    )
コード例 #15
0
def _vs_function_egress() -> ValueSpec:
    return Dictionary(
        title=_("Levels on network egress"),
        elements=[
            ("net_data_sent", Levels(title=_("instances"))),
        ],
    )
コード例 #16
0
def _parameter_valuespec_brightness():
    return Levels(
        title=_("Brightness"),
        unit=_("lx"),
        default_value=None,
        default_difference=(2.0, 4.0),
        default_levels=(50.0, 100.0),
    )
コード例 #17
0
ファイル: f5_connections.py プロジェクト: troelsarvin/checkmk
def _parameter_valuespec_f5_connections():
    return Dictionary(elements=[
        (
            "conns",
            Levels(
                title=_("Max. number of connections"),
                default_value=None,
                default_levels=(25000, 30000),
            ),
        ),
        (
            "ssl_conns",
            Levels(
                title=_("Max. number of SSL connections"),
                default_value=None,
                default_levels=(25000, 30000),
            ),
        ),
        (
            "connections_rate",
            Levels(
                title=_("Maximum connections per second"),
                default_value=None,
                default_levels=(500, 1000),
            ),
        ),
        (
            "connections_rate_lower",
            Tuple(
                title=_("Minimum connections per second"),
                elements=[
                    Integer(title=_("Warning at")),
                    Integer(title=_("Critical at")),
                ],
            ),
        ),
        (
            "http_req_rate",
            Levels(
                title=_("HTTP requests per second"),
                default_value=None,
                default_levels=(500, 1000),
            ),
        ),
    ], )
コード例 #18
0
ファイル: jvm_threading.py プロジェクト: troelsarvin/checkmk
def _parameter_valuespec_jvm_threading():
    return Dictionary(elements=[
        (
            "threadcount_levels",
            Levels(
                title=_("Maximal number of threads"),
                default_value=None,
            ),
        ),
        (
            "threadrate_levels",
            Levels(
                title=_("Maximal rate of thread count"),
                default_value=None,
            ),
        ),
        ("daemonthreadcount_levels",
         Levels(title=_("Maximal number of daemon threads"))),
    ], )
コード例 #19
0
ファイル: globalprotect.py プロジェクト: tribe29/checkmk
def _parameter_valuespec_globalprotect_utilization():
    return Dictionary(
        elements=[
            (
                "utilization",
                Levels(
                    title=_("Utilization"),
                    unit=_("%"),
                    default_value=None,
                    default_levels=(80.0, 90.0),
                ),
            ),
            (
                "active_tunnels",
                Levels(
                    title=_("Number of active tunnels"),
                    default_value=None,
                ),
            ),
        ],
    )
コード例 #20
0
ファイル: vm_counter.py プロジェクト: troelsarvin/checkmk
def _parameter_valuespec_vm_counter():
    return Levels(
        help=_(
            "This ruleset applies to several similar checks measing various kernel "
            "events like context switches, process creations and major page faults. "
            "Please create separate rules for each type of kernel counter you "
            "want to set levels for."
        ),
        unit=_("events per second"),
        default_levels=(1000, 5000),
        default_difference=(500.0, 1000.0),
        default_value=None,
    )
コード例 #21
0
def _parameter_valuespec_checkpoint_packets():
    return Dictionary(elements=[
        (
            "accepted",
            Levels(
                title=_("Maximum Rate of Accepted Packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "rejected",
            Levels(
                title=_("Maximum Rate of Rejected Packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "dropped",
            Levels(
                title=_("Maximum Rate of Dropped Packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
        (
            "logged",
            Levels(
                title=_("Maximum Rate of Logged Packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec",
            ),
        ),
    ], )
コード例 #22
0
def _parameter_valuespec_ibm_svc_total_latency():
    return Dictionary(
        elements=[
            (
                "read",
                Levels(
                    title=_("Read latency"),
                    unit=_("ms"),
                    default_value=None,
                    default_levels=(50.0, 100.0),
                ),
            ),
            (
                "write",
                Levels(
                    title=_("Write latency"),
                    unit=_("ms"),
                    default_value=None,
                    default_levels=(50.0, 100.0),
                ),
            ),
        ],
    )
コード例 #23
0
ファイル: gcp_gcs.py プロジェクト: LinuxHaus/checkmk
def _vs_run_requests() -> ValueSpec:
    return Dictionary(
        title=_("Levels requests"),
        elements=[
            ("faas_total_instance_count",
             Levels(title=_("Number of running containers"))),
            ("faas_execution_count", Levels(title=_("Number of requests"))),
            (
                "faas_execution_count_2xx",
                Levels(title=_(
                    "Number of requests with return code class 2xx (sucess)")),
            ),
            (
                "faas_execution_count_3xx",
                Levels(title=_(
                    "Number of requests with return code class 3xx (redirection)"
                )),
            ),
            (
                "faas_execution_count_4xx",
                Levels(title=_(
                    "Number of requests with return code class 4xx (client error)"
                )),
            ),
            (
                "faas_execution_count_5xx",
                Levels(title=_(
                    "Number of requests with return code class 5xx (server error)"
                )),
            ),
            ("gcp_billable_time", Levels(title=_("billable time"),
                                         unit="s/s")),
            ("faas_execution_times",
             Levels(title=_("99th percentile request latency"), unit="s")),
        ],
    )
コード例 #24
0
def _parameter_valuespec_safenet_hsm_operstats():
    return Dictionary(elements=[
        (
            "error_rate",
            Tuple(
                title=_("Error rate"),
                elements=[
                    Float(title=_("Warning at"),
                          default_value=0.01,
                          unit=_("1/s")),
                    Float(title=_("Critical at"),
                          default_value=0.05,
                          unit=_("1/s")),
                ],
            ),
        ),
        (
            "request_rate",
            Levels(
                title=_("Request rate"),
                unit=_("1/s"),
                default_value=None,
            ),
        ),
        (
            "operation_errors",
            Tuple(
                title=_("Operation errors"),
                help=
                _("Sets levels on total operation errors since last counter reset."
                  ),
                elements=[
                    Integer(title=_("Warning at"), default_value=0),
                    Integer(title=_("Critical at"), default_value=1),
                ],
            ),
        ),
    ], )
コード例 #25
0
def _parameter_valuespec_f5_bigip_vserver():
    return Dictionary(
        elements=[
            (
                "if_in_octets",
                Levels(
                    title=_("Incoming Traffic Maximum"),
                    unit=_("bytes/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_in_octets_lower",
                Levels(
                    title=_("Incoming Traffic Minimum"),
                    unit=_("bytes/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_out_octets",
                Levels(
                    title=_("Outgoing Traffic Maximum"),
                    unit=_("bytes/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_out_octets_lower",
                Levels(
                    title=_("Outgoing Traffic Minimum"),
                    unit=_("bytes/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_total_octets",
                Levels(
                    title=_("Total Traffic Maximum"),
                    unit=_("bytes/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_total_octets_lower",
                Levels(
                    title=_("Total Traffic Minimum"),
                    unit=_("bytes/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_in_pkts",
                Levels(
                    title=_("Incoming Packets Maximum"),
                    unit=_("packets/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_in_pkts_lower",
                Levels(
                    title=_("Incoming Packets Minimum"),
                    unit=_("packets/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_out_pkts",
                Levels(
                    title=_("Outgoing Packets Maximum"),
                    unit=_("packets/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_out_pkts_lower",
                Levels(
                    title=_("Outgoing Packets Minimum"),
                    unit=_("packets/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_total_pkts",
                Levels(
                    title=_("Total Packets Maximum"),
                    unit=_("packets/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "if_total_pkts_lower",
                Levels(
                    title=_("Total Packets Minimum"),
                    unit=_("packets/s"),
                    default_difference=(5, 8),
                    default_value=None,
                ),
            ),
            (
                "state",
                Dictionary(
                    title=_("Map states"),
                    elements=[
                        ("is_disabled", MonitoringState(title=_("Is disabled"), default_value=1)),
                        (
                            "is_up_and_available",
                            MonitoringState(title=_("Is up and available"), default_value=0),
                        ),
                        (
                            "is_currently_not_available",
                            MonitoringState(title=_("Is currently not available"), default_value=2),
                        ),
                        (
                            "is_not_available",
                            MonitoringState(title=_("Is not available"), default_value=2),
                        ),
                        (
                            "availability_is_unknown",
                            MonitoringState(title=_("Availability is unknown"), default_value=1),
                        ),
                        (
                            "is_unlicensed",
                            MonitoringState(title=_("Is unlicensed"), default_value=3),
                        ),
                        (
                            "children_pool_members_down_if_not_available",
                            # Special handling, see check plugin
                            MonitoringState(
                                title=_(
                                    "The children pool member(s) are down if VServer is not available"
                                ),
                                default_value=0,
                            ),
                        ),
                    ],
                    optional_keys=False,
                ),
            ),
        ],
    )
コード例 #26
0
def _parameter_valuespec_diskstat():
    return Dictionary(
        help=
        _("With this rule you can set limits for various disk IO statistics. "
          "Keep in mind that not all of these settings may be applicable for the actual "
          "check. For example, if the check doesn't provide a <i>Read wait</i> information in its "
          "output, any configuration setting referring to <i>Read wait</i> will have no effect."
          ),
        elements=[
            (
                "read",
                Levels(
                    title=_("Read throughput"),
                    unit=_("MB/s"),
                    default_levels=(50.0, 100.0),
                ),
            ),
            (
                "write",
                Levels(
                    title=_("Write throughput"),
                    unit=_("MB/s"),
                    default_levels=(50.0, 100.0),
                ),
            ),
            (
                "utilization",
                Levels(
                    title=_("Disk Utilization"),
                    unit=_("%"),
                    default_levels=(80.0, 90.0),
                ),
            ),
            (
                "latency",
                Levels(
                    title=_("Disk Latency"),
                    unit=_("ms"),
                    default_levels=(80.0, 160.0),
                ),
            ),
            (
                "read_latency",
                Levels(
                    title=_("Disk Read Latency"),
                    unit=_("ms"),
                    default_levels=(80.0, 160.0),
                ),
            ),
            (
                "write_latency",
                Levels(
                    title=_("Disk Write Latency"),
                    unit=_("ms"),
                    default_levels=(80.0, 160.0),
                ),
            ),
            ("read_wait",
             Levels(title=_("Read wait"),
                    unit=_("ms"),
                    default_levels=(30.0, 50.0))),
            (
                "write_wait",
                Levels(title=_("Write wait"),
                       unit=_("ms"),
                       default_levels=(30.0, 50.0)),
            ),
            (
                "average",
                Age(
                    title=_("Averaging"),
                    help=
                    _("When averaging is set, then all of the disk's metrics are averaged "
                      "over the selected interval - rather then the check interval. This allows "
                      "you to make your monitoring less reactive to short peaks. But it will also "
                      "introduce a loss of accuracy in your graphs. "),
                    default_value=300,
                ),
            ),
            (
                "read_ios",
                Levels(title=_("Read operations"),
                       unit=_("1/s"),
                       default_levels=(400.0, 600.0)),
            ),
            (
                "write_ios",
                Levels(title=_("Write operations"),
                       unit=_("1/s"),
                       default_levels=(300.0, 400.0)),
            ),
        ],
    )
コード例 #27
0
def _parameter_valuespec_safenet_ntls_links():
    return Levels(
        title=_("NTLS Links"),
        default_value=None,
    )
コード例 #28
0
def _parameter_valuespec_safenet_ntls_clients():
    return Levels(
        title=_("NTLS Clients"),
        help=_("Number of connected clients"),
        default_value=None,
    )
コード例 #29
0
ファイル: cpu_utilization.py プロジェクト: m3rlinux/checkmk
def cpu_util_elements():
    return [
        (
            "core_util_time_total",
            Tuple(
                title=
                _("Levels over an extended time period on total CPU utilization"
                  ),
                elements=[
                    Percentage(title=_("High utilization at "),
                               default_value=100.0),
                    Age(title=_("Warning after "), default_value=5 * 60),
                    Age(title=_("Critical after "), default_value=15 * 60),
                ],
                help=
                _("With this configuration, Checkmk will alert if the actual (not averaged) total CPU is "
                  "exceeding a utilization threshold over an extended period of time. "
                  "ATTENTION: This configuration cannot be used for check <i>lparstat_aix.cpu_util</i>!"
                  ),
            ),
        ),
        (
            "core_util_time",
            Tuple(
                title=
                _("Levels over an extended time period on a single core CPU utilization"
                  ),
                elements=[
                    Percentage(title=_("High utilization at "),
                               default_value=100.0),
                    Age(title=_("Warning after "), default_value=5 * 60),
                    Age(title=_("Critical after "), default_value=15 * 60),
                ],
                help=
                _("A single thread fully utilizing a single core (potentially due to a bug) "
                  "may go unnoticed when only monitoring the total utilization of the CPU. "
                  "With this configuration, Checkmk will alert if a single core is "
                  "exceeding a utilization threshold over an extended period of time."
                  "This is currently only supported on linux and windows agents "
                  "as well as devices monitored through the host-resource mib"
                  ),
            ),
        ),
        (
            "average",
            Integer(
                title=_("Averaging for total CPU utilization"),
                help=
                _("When this option is activated then the CPU utilization is being "
                  "averaged <b>before</b> the levels on total CPU utilization are being applied."
                  ),
                unit=_("minutes"),
                minvalue=1,
                default_value=15,
                label=_("Compute average over last "),
            ),
        ),
        (
            "average_single",
            Dictionary(
                title=_("Averaging for single cores"),
                help=
                _("Compute averaged single-core CPU utilizations. Note that this option only has "
                  "an effect if at least one of the sub-options 'Apply single-core levels' or "
                  "'Graphs for averaged single-core utilizations' is enabled."
                  ),
                elements=[
                    (
                        "time_average",
                        Integer(
                            title=_("Time frame"),
                            unit=_("minutes"),
                            minvalue=1,
                            default_value=15,
                            label=_("Compute average over last "),
                        ),
                    ),
                    (
                        "apply_levels",
                        DropdownChoice(
                            title=
                            _("Apply single-core levels defined in 'Levels on single cores'"
                              ),
                            help=_(
                                "Apply the levels for single cores to the averaged instead of the "
                                "instantaneous utilizations."),
                            choices=[
                                (True, _("Enable")),
                                (False, _("Disable")),
                            ],
                            default_value=False,
                        ),
                    ),
                    (
                        "show_graph",
                        DropdownChoice(
                            title=_(
                                "Graphs for averaged single-core utilizations"
                            ),
                            help=_(
                                "Create a separate graph showing the averaged single-core CPU "
                                "utilizations."),
                            choices=[
                                (True, _("Enable")),
                                (False, _("Disable")),
                            ],
                            default_value=False,
                        ),
                    ),
                ],
                optional_keys=False,
            ),
        ),
        (
            "util",
            Levels(
                title=_("Levels on total CPU utilization"),
                unit="%",
                default_levels=(90, 95),
                default_difference=(5, 8),
                default_value=None,
                help=
                _("The CPU utilization sums up the percentages of CPU time that is used "
                  "for user processes, kernel routines (system), disk wait (sometimes also "
                  "called IO wait) or nothing (idle). The levels are always applied "
                  "on the average utilization since the last check - which is usually one minute."
                  ),
            ),
        ),
        (
            "levels_single",
            Tuple(
                title=_("Levels on single cores"),
                elements=[
                    Percentage(title=_("Warning at"), default_value=90.0),
                    Percentage(title=_("Critical at"), default_value=95.0),
                ],
                help=
                _("Here you can set levels on the CPU utilization on single cores"
                  ),
            ),
        ),
        (
            "core_util_graph",
            DropdownChoice(
                title=_("Graphs for individual cores"),
                help=
                _("This adds another graph to the performance CPU utilization "
                  "details page, showing utilization of individual cores. "
                  "Please note that this graph may be impractical on "
                  "device with very many cores. "
                  "This is currently only supported on linux and windows agents "
                  "as well as devices monitored through the host-resource mib"
                  ),
                choices=[
                    (True, _("Enable")),
                    (False, _("Disable")),
                ],
                default_value=True,
            ),
        ),
    ]
コード例 #30
0
def _parameter_valuespec_kernel_performance():
    return Dictionary(elements=[
        (
            "ctxt",
            Levels(
                unit=_("events per second"),
                title=_("Context Switches"),
                default_levels=(1000, 5000),
                default_difference=(500.0, 1000.0),
                default_value=None,
            ),
        ),
        (
            "processes",
            Levels(
                unit=_("events per second"),
                title=_("Process Creations"),
                default_levels=(1000, 5000),
                default_difference=(500.0, 1000.0),
                default_value=None,
            ),
        ),
        (
            "pgmajfault",
            Levels(
                unit=_("events per second"),
                title=_("Major Page Faults"),
                default_levels=(1000, 5000),
                default_difference=(500.0, 1000.0),
                default_value=None,
            ),
        ),
        (
            "page_swap_in_levels_lower",
            Tuple(
                title=_("Swap In Lower"),
                elements=[
                    Float(title=_("Swap In warning below"),
                          unit=_("events per second")),
                    Float(title=_("Swap In critical below"),
                          unit=_("events per second")),
                ],
            ),
        ),
        (
            "page_swap_in_levels",
            Tuple(
                title=_("Swap In Upper"),
                elements=[
                    Float(title=_("Swap In warning at"),
                          unit=_("events per second")),
                    Float(title=_("Swap In critical at"),
                          unit=_("events per second")),
                ],
            ),
        ),
        (
            "page_swap_out_levels_lower",
            Tuple(
                title=_("Swap Out Lower"),
                elements=[
                    Float(title=_("Swap Out warning below"),
                          unit=_("events per second")),
                    Float(title=_("Swap Out critical below"),
                          unit=_("events per second")),
                ],
            ),
        ),
        (
            "page_swap_out_levels",
            Tuple(
                title=_("Swap Out Upper"),
                elements=[
                    Float(title=_("Swap Out warning at"),
                          unit=_("events per second")),
                    Float(title=_("Swap Out critical at"),
                          unit=_("events per second")),
                ],
            ),
        ),
    ], )