{"type":"api","title":"Edit Custom Syslog Event by Event Type","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/3ba2ebf1-2c82-351f-9129-0701a2a03db6","info":{"title":"APIs exposed by Alarm Rest service","description":"APIs exposed by Alarm Rest service.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"7.1.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/EMF/fault-emf-api-overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://{server_ip}:30603/crosswork/alarm/v1","description":"Generated server url"}]},"spec":{"tags":["alarm-rest"],"summary":"Edit Custom Syslog Event by Event Type","description":"Updates the custom syslog configuration based on the event type.\u003cbr\u003e \u003cbr\u003e **Mandatory Fields:**\n `mnemonic`,\n `mnemonicregex`,\n `regexDetails`,\n `groupIndex`,\n `regex`,\n `variableName` \u003cbr\u003e\nIn `eventDetails`, the following fields are mandatory:\n `eventType`,\n `category`,\n `defaultSeverity`,\n `description`,\n `asid`\n\u003cbr\u003e\n **Optional Fields:**\n `locationQuery`\n `autoClear`\n `probableCause`\n `recommendationAction`\n `matchConditions`\n \u003cbr\u003e\n \u003cbr\u003e\n`eventDetails -\u003e category`: Possible values include \"BFD\", \"BGP\", \"Carrier Ethernet\", \"Clients\", \"Controller\", \"Generic\", \"ISIS\", \"MPLS\", \"MPLS-L3VPN\", \"NTP\", \"OSPF\", \"Optical Transport\", \"PTP\", \"Performance\", \"RIP\", \"SONET\", \"SYNCE\", \"Security\", \"Switches and Routers\", \"System\", \"NCS\". \u003cbr\u003e\n `eventDetails -\u003e defaultSeverity`: Possible values include \"Critical\", \"Major\", \"Minor\", \"Warning\", \"Information\", \"Cleared\". \u003cbr\u003e\n `matchConditions -\u003e operator`: Possible values include \u003e, \u003c, or =.\n \u003cbr\u003e \n ","operationId":"editCustomSyslog","parameters":[{"name":"eventtype","in":"path","required":true,"schema":{"type":"string"},"description":"The event type for which the syslog configuration is being edited."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Payload for updating syslog configurations","properties":{"mnemonic":{"type":"string","description":"Mnemonic identifier for the syslog event","example":"LINEPROTO-5-UPDOWN"},"mnemonicregex":{"type":"string","description":"Regular expression for matching mnemonics","example":"%(\\S+-\\d-\\S+):"},"regexDetails":{"type":"array","description":"Details of regex patterns used in syslog","items":{"type":"object","properties":{"groupIndex":{"type":"integer","description":"Index of the regex group","example":1},"regex":{"type":"string","description":"Regex pattern for matching log details","example":"Interface\\s*(\\S+)\\s*"},"variableName":{"type":"string","description":"Name of the variable extracted by regex","example":"interfacename"}},"required":["groupIndex","regex","variableName"]}},"eventDetails":{"type":"array","description":"Details of events associated with the syslog","items":{"type":"object","properties":{"eventType":{"type":"string","description":"Type of event associated with the syslog","example":"LINEPROTO-5-DOWN"},"category":{"type":"string","description":"Category of the event","example":"Switches and Routers"},"defaultSeverity":{"type":"string","description":"Default severity level of the event","example":"MINOR"},"description":{"type":"string","description":"Description of the event","example":"Line protocol on Interface $interfacename , changed state to $status"},"asid":{"type":"string","description":"ASID associated with the event","example":"$deviceUuid:$interfacename:LINEPROTO-5-UPDOWN"},"locationQuery":{"type":"string","description":"Query to determine event location","example":"select id,name,classname from protocolendpoint where name= :$interfacename and owningentityid = :$owningEntityId and classname != 'PhysicalProtocolEndpoint' and classname != 'IpProtocolEndpoint'"},"autoClear":{"type":"string","description":"Duration in minutes for auto-clearing the event","example":"120"},"probableCause":{"type":"string","description":"Probable cause of the event","example":"probable cause"},"recommendationAction":{"type":"string","description":"Recommended action for the event","example":"recommended action"},"matchConditions":{"type":"array","description":"Conditions to match for the event","items":{"type":"object","properties":{"variableName":{"type":"string","description":"Name of the variable for condition matching","example":"status"},"expectedValues":{"type":"string","description":"Expected values for the condition","example":"Down"},"operator":{"type":"string","description":"Operator for the condition","example":"="}}}}},"required":["eventType","category","defaultSeverity","description","asid"]}}},"required":["mnemonic","mnemonicregex","regexDetails","eventDetails"],"$$ref":"#/components/schemas/SyslogUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Syslog configuration updated successfully","content":{"application/json":{"schema":{"type":"object","description":"Response object for syslog update operations","properties":{"status":{"type":"string","description":"Status of the syslog update operation","example":"Success/Fail"},"message":{"type":"string","description":"Message indicating the result of the syslog update operation","example":"error-message"}},"$$ref":"#/components/schemas/SyslogUpdateResponse"}}}},"403":{"description":"Authentication and Authorization errors"},"500":{"description":"operation-failed Response with error"}},"__originalOperationId":"editCustomSyslog","method":"put","path":"/custom/syslog/{eventtype}"}}