
|
Server : Apache System : Linux 182.49.167.72.host.secureserver.net 4.18.0-553.92.1.el8_10.x86_64 #1 SMP Wed Jan 14 06:31:58 EST 2026 x86_64 User : kikai ( 1014) PHP Version : 8.3.30 Disable Function : NONE Directory : /lib/fm-agent/library/__pycache__/ |
Upload File : |
3 ,`ri� � @ s4 d dl Z d dlZd dlZd dlZG dd� de�ZdS )� Nc @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S ) � Thresholdc K sP t j| jj�| _|jd�| _|jdd�| _|jdd�| _|jdd �| _ d| _ d S )N�id�delayr �value�operatorF)�logging� getLogger� __class__�__name__�log�getr Zduration�limitr Zreported)�self�kwargs� r �&/usr/lib/fm-agent/library/threshold.py�__init__ s zThreshold.__init__c C s t | j�}|d= |S )Nr )�dict�__dict__)r �stater r r �__getstate__ s zThreshold.__getstate__c C s | j j|� tj| jj�| _d S )N)r �updater r r r r )r r r r r �__setstate__ s zThreshold.__setstate__c C sP | j d kr| jjd| j� d S tt | j �}| jjd|| j | j| j� ||| j�S )Nz Threshold %s is a null thresholdz9Testing if value (%.2f) is %s threshold %s's limit (%.2f))r r �debugr �getattrr )r r Z operationr r r �limit_exceeded s zThreshold.limit_exceededN)r � __module__�__qualname__r r r r r r r r r s r )r r �sys�time�objectr r r r r �<module> s