Title: Trap handler can't be created if OID in the trap contains quotes, escaped with backslash · Issue #76 · patrickpr/trapdirector · GitHub
Open Graph Title: Trap handler can't be created if OID in the trap contains quotes, escaped with backslash · Issue #76 · patrickpr/trapdirector
X Title: Trap handler can't be created if OID in the trap contains quotes, escaped with backslash · Issue #76 · patrickpr/trapdirector
Description: Get debug logs Nothing related to trap processing is displayed in the log Describe the bug When I try to create a trap handler for a trap received from Ciena device, OIDs from "Additional data" aren't parsed correctly and not shown on th...
Open Graph Description: Get debug logs Nothing related to trap processing is displayed in the log Describe the bug When I try to create a trap handler for a trap received from Ciena device, OIDs from "Additional data" are...
X Description: Get debug logs Nothing related to trap processing is displayed in the log Describe the bug When I try to create a trap handler for a trap received from Ciena device, OIDs from "Additional data...
Opengraph URL: https://github.com/patrickpr/trapdirector/issues/76
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Trap handler can't be created if OID in the trap contains quotes, escaped with backslash","articleBody":"# Get debug logs\r\nNothing related to trap processing is displayed in the log\r\n\r\n# Describe the bug\r\nWhen I try to create a trap handler for a trap received from Ciena device, OIDs from \"Additional data\" aren't parsed correctly and not shown on the page. \r\nThis is the example of trap data: \r\n\r\nTrap Detail\r\n[Add a trap handler]\r\nDate\tMon 06 Nov 2023 01:18:22 PM EST\r\nSource IP\t10.35.10.9\r\nSource name\t\r\nSource port\t56838\r\nDestination IP\t10.0.9.161\r\nDestination port\t162\r\nNumeric OID\t.1.3.6.1.4.1.562.29.6.1.0.301\r\nTrap name\tnnExtAlarmClear\r\nTrap MIB\tNORTEL-ALARM-EXT-MIB\r\nProcessing status\tunknown\r\nStatus details\tNo action\r\nTrap processing time\t1.47989\r\n\r\nAdditional data\r\nNumeric OID \tText OID \tMIB \tValue\r\n.1.3.6.1.2.1.1.3.0 \tsysUpTimeInstance \tDISMAN-EVENT-MIB \t132:15:15:00.00\r\n.1.3.6.1.4.1.562.29.6.2.1 \tnnAlarmActiveResourceId \tNORTEL-ALARM-EXT-MIB \t.0.0\r\n.1.3.6.1.4.1.562.29.6.2.2 \tnnAlarmActiveDateAndTime \tNORTEL-ALARM-EXT-MIB \t\"07 E7 0B 06 12 12 14 00 \"\r\n.1.3.6.1.4.1.562.29.6.2.3 \tnnAlarmActiveDescription \tNORTEL-ALARM-EXT-MIB \t\"Unable to Synchronize TOD\"\r\n.1.3.6.1.4.1.562.29.6.1.1.1.1 \tnnExtAlarmActiveEventType \tNORTEL-ALARM-EXT-MIB \t11\r\n.1.3.6.1.4.1.562.29.6.1.1.1.2 \tnnExtAlarmActiveProbableCause \tNORTEL-ALARM-EXT-MIB \t6219\r\n.1.3.6.1.4.1.562.29.6.1.1.1.3 \tnnExtAlarmActiveAdditionalText \tNORTEL-ALARM-EXT-MIB \t\"OPP01.XXXX:SP-1-41,TODSYNCFAIL,NSA,NEND,RCV,0336,0100000855,NA,0.00,TOD Server 5\"\r\n.1.3.6.1.4.1.562.29.6.1.1.1.4 \tnnExtAlarmActiveDocumentationPointer \tNORTEL-ALARM-EXT-MIB \t\"NA\"\r\n.1.3.6.1.4.1.562.29.6.1.1.1.5 \tnnExtAlarmActiveResourceDescription \tNORTEL-ALARM-EXT-MIB \t\"NA\"\r\n.1.3.6.1.4.1.562.29.6.1.1.1.7 \tnnExtAlarmActiveSequenceNumber \tNORTEL-ALARM-EXT-MIB \t2236\r\n.1.3.6.1.4.1.562.68.11.1.1.1 \tshelfId \tNORTEL-OME6500-SHELF-PARAMS-MIB \t1\r\n.1.3.6.1.4.1.562.68.11.1.1.2 \tshelfSubId \tNORTEL-OME6500-SHELF-PARAMS-MIB \t0\r\n.1.3.6.1.4.1.562.68.11.1.1.3 \tshelfTid \tNORTEL-OME6500-SHELF-PARAMS-MIB \t\"\\\"OPP01.XXXX\\\"\"\r\n.1.3.6.1.4.1.562.68.11.1.1.4 \tshelfIpAddress \tNORTEL-OME6500-SHELF-PARAMS-MIB \t10.35.10.9\r\n.1.3.6.1.4.1.562.68.11.1.1.6 \tshelfSiteId \tNORTEL-OME6500-SHELF-PARAMS-MIB \t8\r\n.1.3.6.1.6.3.1.1.4.3.0 \tsnmpTrapEnterprise.0 \tSNMPv2-MIB \t.1.3.6.1.4.1.562.68.11\r\n\r\nHere is the picture:\r\n\r\n\r\nNext, when I start creation of a handler, OIDs from \"Additional data\" aren't displayed, the picture:\r\n\r\n\r\nIn browser console I see an error, that points to some quoting issue:\r\n\r\n\r\nBut if I inspect the page code, I see all trap OIDs in the script:\r\n\r\n\r\nI suspect that internal quotes used in value of this OID break the parsing:\r\n.1.3.6.1.4.1.562.68.11.1.1.3 \tshelfTid \tNORTEL-OME6500-SHELF-PARAMS-MIB \t\"\\\"OPP01.XXXX\\\"\"\r\n\r\nNext, if I try to create a new trap handler without adding fields manually, I get just 404 Page not found. This error is visible in the browser console log shown above.\r\n\r\n# To Reproduce\r\nSteps to reproduce the behavior:\r\nThis behavior is stable for any traps received from Ciena devices\r\n\r\n# Expected behavior\r\nTo be able to create a new trap handler\r\n\r\n# Your Environment:\r\n* trapdirector version (in icinga web 2 : System - About): 1.0.7a\r\n* Icinga Web 2 version and modules (in icinga web 2 : System - About): 2.8.2\r\n* Icinga 2 version (`icinga2 --version`): 2.12.1-1\r\n* Operating System and version:\r\n* System information:\r\n Platform: CentOS Linux\r\n Platform version: 8 (Core)\r\n Kernel: Linux\r\n Kernel version: 4.18.0-147.8.1.el8_1.x86_64\r\n Architecture: x86_64\r\n\r\n* Webserver, PHP versions:\r\nPHP 7.2.24 \r\nServer version: Apache/2.4.37 (centos)\r\n\r\n# Additional context\r\n\r\n","author":{"url":"https://github.com/ankost403","@type":"Person","name":"ankost403"},"datePublished":"2023-11-06T19:59:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/76/trapdirector/issues/76"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e0f8de73-5758-b967-c733-bae520e376c0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFD2:C401D:87754A:AE0141:6992950D |
| html-safe-nonce | 913bed084f72391c9f2e94b55f72cc66f99205960e56a41aad71f25ec5fbdfa9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkQyOkM0MDFEOjg3NzU0QTpBRTAxNDE6Njk5Mjk1MEQiLCJ2aXNpdG9yX2lkIjoiMzIyMDYzMTE5NTA4NzM5MzQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 42322f50c9fe667a4bc7c6fb148add2f81acb4f7cf33b9d623e80b465f90b943 |
| hovercard-subject-tag | issue:1979962874 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/patrickpr/trapdirector/76/issue_layout |
| twitter:image | https://opengraph.githubassets.com/701f31de622f68b7f87e4b002291b1f2ef002df61de878dc20e75b38d874b318/patrickpr/trapdirector/issues/76 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/701f31de622f68b7f87e4b002291b1f2ef002df61de878dc20e75b38d874b318/patrickpr/trapdirector/issues/76 |
| og:image:alt | Get debug logs Nothing related to trap processing is displayed in the log Describe the bug When I try to create a trap handler for a trap received from Ciena device, OIDs from "Additional data" are... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ankost403 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/patrickpr/trapdirector git https://github.com/patrickpr/trapdirector.git |
| octolytics-dimension-user_id | 2913330 |
| octolytics-dimension-user_login | patrickpr |
| octolytics-dimension-repository_id | 164436083 |
| octolytics-dimension-repository_nwo | patrickpr/trapdirector |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 164436083 |
| octolytics-dimension-repository_network_root_nwo | patrickpr/trapdirector |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width