{"id":2658,"date":"2020-01-30T22:50:23","date_gmt":"2020-01-30T21:50:23","guid":{"rendered":"https:\/\/beufa.net\/?p=2658"},"modified":"2020-08-06T08:19:21","modified_gmt":"2020-08-06T07:19:21","slug":"rpki-routinator-monitoring-and-debug","status":"publish","type":"post","link":"https:\/\/beufa.net\/fr\/blog\/rpki-routinator-monitoring-and-debug\/","title":{"rendered":"RPKI &#8211; Routinator Monitoring and debug"},"content":{"rendered":"\n<p>I can&#8217;t stop digging around Routinator. See previous posts to understand everything \ud83d\ude00<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" aria-label=\"RPKI \u2013 Use Routinator with Cisco IOS-XR (opens in a new tab)\" href=\"https:\/\/beufa.net\/blog\/rpki-use-routinator-rtr-cache-validator-cisco-ios-xr\/\" target=\"_blank\">RPKI \u2013 Use Routinator with Cisco IOS-XR<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\"RPKI \u2013 More Routinator \u2026 (opens in a new tab)\" href=\"https:\/\/beufa.net\/blog\/rpki-more-routinator\/\" target=\"_blank\">RPKI \u2013 More Routinator \u2026<\/a><\/li><\/ul>\n\n\n\n<p>Routinator provides an http interface to check about its inside, from metrics to status through VRPs debug.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Metrics<\/h2>\n\n\n\n<p>Go to your server on your URL <em>http:\/\/srv-rpki01:8080\/metrics <\/em>and you will get the following output that can be pushed to Prometheus (or anything else !)<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"sh\" data-theme=\"ambiance\" data-fontsize=\"13\" data-lines=\"Infinity\" data-showlines=\"false\" data-copy=\"false\"># HELP routinator_valid_roas number of valid ROAs seen\n# TYPE routinator_valid_roas gauge\nroutinator_valid_roas{tal=\"ripe\"} 13845\nroutinator_valid_roas{tal=\"arin\"} 6108\nroutinator_valid_roas{tal=\"apnic\"} 5677\nroutinator_valid_roas{tal=\"afrinic\"} 555\nroutinator_valid_roas{tal=\"lacnic\"} 3114\n\n# HELP routinator_vrps_total total number of VRPs seen\n# TYPE routinator_vrps_total gauge\nroutinator_vrps_total{tal=\"ripe\"} 76757\nroutinator_vrps_total{tal=\"arin\"} 8570\nroutinator_vrps_total{tal=\"apnic\"} 33528\nroutinator_vrps_total{tal=\"afrinic\"} 975\nroutinator_vrps_total{tal=\"lacnic\"} 8475\n\n# HELP routinator_last_update_start seconds since last update started\n# TYPE routinator_last_update_start gauge\nroutinator_last_update_start 2004\n\n# HELP routinator_last_update_duration duration in seconds of last update\n# TYPE routinator_last_update_duration gauge\nroutinator_last_update_duration 39\n\n# HELP routinator_last_update_done seconds since last update finished\n# TYPE routinator_last_update_done gauge\nroutinator_last_update_done 1965\n\n# HELP routinator_serial current RTR serial number\n# TYPE routinator_serial gauge\nroutinator_serial 344<\/pre><\/div>\n\n\n\n<p>It will help you to create dashboard on Grafana like the following one :<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-1024x566.png\" alt=\"\" class=\"wp-image-2659\" srcset=\"https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-1024x566.png 1024w, https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-300x166.png 300w, https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-768x424.png 768w, https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-1536x849.png 1536w, https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-2048x1132.png 2048w, https:\/\/beufa.net\/wp-content\/uploads\/2020\/01\/routinator_rpki_grafana-1600x884.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Status<\/h2>\n\n\n\n<p>Go to <em>http:\/\/srv-rpki01:8080\/status<\/em> and you will access Routinator status<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"sh\" data-theme=\"ambiance\" data-fontsize=\"13\" data-lines=\"Infinity\" data-showlines=\"false\" data-copy=\"false\">serial: 344\nlast-update-start-at:  2020-01-30 20:41:45.411133392 UTC\nlast-update-start-ago: PT2280.370308920S\nlast-update-done-at:   2020-01-30 20:42:24.618050797 UTC\nlast-update-done-ago:  PT2241.163391515S\nlast-update-duration:  PT39.206927565S\nvalid-roas: 29299\nvalid-roas-per-tal: ripe=13845 arin=6108 apnic=5677 afrinic=555 lacnic=3114 \nvrps: 128305\nvrps-per-tal: ripe=76757 arin=8570 apnic=33528 afrinic=975 lacnic=8475 \nrsync-durations:\n   rsync:\/\/rpki.ripe.net\/ta\/: status=0, duration=0.042s\n   rsync:\/\/rpki.apnic.net\/repository\/: status=0, duration=3.146s\n   rsync:\/\/rpki.arin.net\/repository\/: status=0, duration=4.312s\n   rsync:\/\/rpki-repository.nic.ad.jp\/ap\/: status=0, duration=8.018s\n   rsync:\/\/rpki.afrinic.net\/repository\/: status=0, duration=11.770s\n   rsync:\/\/repository.lacnic.net\/rpki\/: status=0, duration=6.843s\n   rsync:\/\/rpki-repo.registro.br\/repo\/: status=0, duration=7.629s\n   rsync:\/\/localhost\/repo\/: status=10, duration=0.004s\nrrdp-durations:\n   https:\/\/rrdp.ripe.net\/notification.xml: status=200, duration=1.590s\n   https:\/\/rrdp.apnic.net\/notification.xml: status=200, duration=4.034s\n   https:\/\/ca.rg.net\/rrdp\/notify.xml: status=200, duration=0.492s\n   https:\/\/rpki.cnnic.cn\/rrdp\/notify.xml: status=200, duration=2.294s\n   https:\/\/rpki-repo.registro.br\/rrdp\/notification.xml: status=200, duration=1.428s\n   https:\/\/rrdp.rpki.nlnetlabs.nl\/rrdp\/notification.xml: status=200, duration=0.280s\n   https:\/\/rrdp.arin.net\/notification.xml: status=200, duration=0.910s\n   https:\/\/rpki-ca.idnic.net\/rrdp\/notification.xml: status=200, duration=1.278s\n   https:\/\/rrdp.twnic.tw\/rrdp\/notify.xml: status=200, duration=1.433s\n   https:\/\/localhost:3000\/rrdp\/notification.xml: status=-1, duration=0.001s<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Other methods<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">JSON and other output formats<\/h3>\n\n\n\n<p>Want to check about a prefix ?  Check on<em> http:\/\/srv-rpki01:8080\/json<\/em>, you will be able to fetch all ROAs into JSON format. Other methods exist to fetch ROAs in multiple formats, read the following: <a rel=\"noreferrer noopener\" aria-label=\"Routinator Docs - The HTTP Daemon (opens in a new tab)\" href=\"https:\/\/rpki.readthedocs.io\/en\/latest\/routinator\/daemon.html#the-http-service\" target=\"_blank\">Routinator Docs &#8211; The HTTP Daemon<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check Validity<\/h3>\n\n\n\n<p>For example, go on <em>http:\/\/srv-rpki01:8080\/validity?asn=13335&amp;prefix=1.1.1.0\/24<\/em>, you will be able to check validity for prefix 1.1.1.0\/24 from AS13335 :<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"json\" data-theme=\"ambiance\" data-fontsize=\"13\" data-lines=\"Infinity\" data-showlines=\"false\" data-copy=\"false\">{\n  \"validated_route\": {\n    \"route\": {\n      \"origin_asn\": \"AS13335\",\n      \"prefix\": \"1.1.1.0\/24\"\n    },\n    \"validity\": {\n      \"state\": \"Valid\",\n      \"description\": \"At least one VRP Matches the Route Prefix\",\n      \"VRPs\": {\n        \"matched\": [\n          {\n            \"asn\": \"AS13335\",\n            \"prefix\": \"1.1.1.0\/24\",\n            \"max_length\": \"24\"\n          }\n\n        ],\n        \"unmatched_as\": [\n        ],\n        \"unmatched_length\": [\n        ]      }\n    }\n  }\n}<\/pre><\/div>\n\n\n\n<p>Lets say, it&#8217;s the same than running a command on the server : <\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"sh\" data-theme=\"ambiance\" data-fontsize=\"13\" data-lines=\"Infinity\" data-showlines=\"false\" data-copy=\"false\">routinator@srv-rpki01:~$ routinator vrps -p 1.1.1.0\/24\nASN,IP Prefix,Max Length,Trust Anchor\nAS13335,1.1.1.0\/24,24,apnic<\/pre><\/div>\n\n\n\n<p>But sometimes, it could help to be faster for the debug to query the API method directly.<\/p>\n\n\n\n<p>If you want to check if it&#8217;s still valid for AS1 : <\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"json\" data-theme=\"ambiance\" data-fontsize=\"13\" data-lines=\"Infinity\" data-showlines=\"false\" data-copy=\"false\">{\n  \"validated_route\": {\n    \"route\": {\n      \"origin_asn\": \"AS1\",\n      \"prefix\": \"1.1.1.0\/24\"\n    },\n    \"validity\": {\n      \"state\": \"Invalid\",\n      \"reason\": \"as\",\n      \"description\": \"At least one VRP Covers the Route Prefix, but no VRP ASN matches the route origin ASN\",\n      \"VRPs\": {\n        \"matched\": [\n        ],\n        \"unmatched_as\": [\n          {\n            \"asn\": \"AS13335\",\n            \"prefix\": \"1.1.1.0\/24\",\n            \"max_length\": \"24\"\n          }\n\n        ],\n        \"unmatched_length\": [\n        ]      }\n    }\n  }\n}<\/pre><\/div>\n\n\n\n<p>Routinator has many options to be monitored and daily used to check if there is something wrong on RPKI. It&#8217;s a real powerful tool for people who want to implement quickly and simply RPKI \/ Resource Origin Validation with some exceptions possible (SLURM)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I can&#8217;t stop digging around Routinator. See previous posts to understand everything \ud83d\ude00 RPKI \u2013 Use Routinator with Cisco IOS-XR RPKI \u2013 More Routinator \u2026&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/beufa.net\/fr\/blog\/rpki-routinator-monitoring-and-debug\/\">Continue reading<span class=\"screen-reader-text\">RPKI &#8211; Routinator Monitoring and debug<\/span><\/a><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[93,103,73,123,107,122,124,120],"class_list":["post-2658","post","type-post","status-publish","format-standard","hentry","category-reseau","tag-bgp","tag-ios-xr","tag-network","tag-roa","tag-route-policy","tag-routinator","tag-rov","tag-rpki","entry"],"_links":{"self":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts\/2658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/comments?post=2658"}],"version-history":[{"count":7,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts\/2658\/revisions"}],"predecessor-version":[{"id":2681,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts\/2658\/revisions\/2681"}],"wp:attachment":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/media?parent=2658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/categories?post=2658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/tags?post=2658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}