Log Alert   /rest/apv/admintools/logbuf/EmailSettings

This configuration page is used to configure log alert rules to enable the system to send alert email to the administrator's email addresses when specific system logs are generated.

  • Relational-instance Queries:
  • GET
    /rest/apv/admintools/logbuf/EmailSettings/alert
    Query the Log Alert Rules info of the corresponding Log Alert.
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Request parameters
    Parameter Type Description
    instance_id URI ID of the instance
    Response format
    {
        "EmailSettings": {
            "instance_id":<instance_id>,
            "alert":[
               {
                <field1>:<value1>,
                <field2>:<value2>,
                ...
               }
            ]
        }
    }
                                
    Examples
  • POST
    /rest/apv/admintools/logbuf/EmailSettings/alert
    Create a Logging Settings for corresponding Log Alert
    Normal response codes
    200(successfully created)
    Error response codes
    401(unauthorized), 403(access forbidden), 500(internal service error), 501(unimplemented)
    Request format
            {
                <param1>:<value1>,
                <param2>:<value2>,
                ...
            }
                                        
    Request parameters
    Parameter Type Description
    log_id uint32
    regular_expression string
    address email
    interval int
    type enum Available values:
    • data (Data) - Indicates sending the whole matched log messages.
    • count (Count) - Indicates sending the number of the matched log messages.
    Response format
            {
                "LogAlert": {
                    "instance_id":<instance_id>,
                    <param1>:<value1>,
                    <param2>:<value2>,
                    ...
                }
            }
                                        
    Response parameters
    Same as request parameters.
    Examples
  • DELETE
    /rest/apv/admintools/logbuf/EmailSettings/alert/<logalert_id>
    Delete a specific Logging Settings of corresponding emailsettings
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Response format
            {
                "msg": <success-or-error-msg>
            }
                                        
    Examples
  • GET
    /rest/apv/admintools/logbuf/EmailSettings/relay_server
    Query the System Mail Relay Server info of the corresponding Log Alert.
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Request parameters
    Parameter Type Description
    instance_id URI ID of the instance
    Response format
    {
        "EmailSettings": {
            "instance_id":<instance_id>,
            "relay_server":[
               {
                <field1>:<value1>,
                <field2>:<value2>,
                ...
               }
            ]
        }
    }
                                
    Examples
  • POST
    /rest/apv/admintools/logbuf/EmailSettings/relay_server
    Create a System Mail Relay Server for corresponding Log Alert
    Normal response codes
    200(successfully created)
    Error response codes
    401(unauthorized), 403(access forbidden), 500(internal service error), 501(unimplemented)
    Request format
            {
                <param1>:<value1>,
                <param2>:<value2>,
                ...
            }
                                        
    Request parameters
    Parameter Type Description
    name string
    relay string
    Response format
            {
                "RelayServer": {
                    "instance_id":<instance_id>,
                    <param1>:<value1>,
                    <param2>:<value2>,
                    ...
                }
            }
                                        
    Response parameters
    Same as request parameters.
    Examples
  • DELETE
    /rest/apv/admintools/logbuf/EmailSettings/relay_server/<relayserver_id>
    Delete a specific System Mail Relay Server of corresponding emailsettings
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Response format
            {
                "msg": <success-or-error-msg>
            }
                                        
    Examples