{"id":369,"date":"2024-11-16T20:53:44","date_gmt":"2024-11-16T19:53:44","guid":{"rendered":"https:\/\/www.systemdeveloper.nl\/tech\/?p=369"},"modified":"2024-11-16T20:53:45","modified_gmt":"2024-11-16T19:53:45","slug":"building-a-secure-configurable-and-scalable-monitoring-api","status":"publish","type":"post","link":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/","title":{"rendered":"Building a Secure, Configurable, and Scalable Monitoring API"},"content":{"rendered":"<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">In a world where infrastructure monitoring is vital, having a flexible and secure way to collect and process custom data is essential. In this blog post, we&rsquo;ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">We&rsquo;ll walk through the recent enhancements to our monitoring API:<\/p>\n\n\n<ul class=\"wp-block-list wp-block-list\">\n<li>\n<strong>Dynamic configuration<\/strong>: Centralized database for fields and validation rules.<\/li>\n\n\n\n<li>\n<strong>Server management<\/strong>: Register servers and validate requests using API keys.<\/li>\n\n\n\n<li>\n<strong>Improved security<\/strong>: Restrict API access to authorized servers.<\/li>\n<\/ul>\n\n\n<h3 class=\"wp-block-heading\" id=\"dynamic-configuration\"><strong>Dynamic Configuration<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Instead of hardcoding validation rules or thresholds, we introduced a database-backed configuration system. This allows you to define:<\/p>\n\n\n<ol class=\"wp-block-list wp-block-list\">\n<li>\n<strong>Field Names<\/strong>: The names of the metrics (e.g., CPU load, memory usage).<\/li>\n\n\n\n<li>\n<strong>Validation Rules<\/strong>: Ensure values are within acceptable ranges.<\/li>\n\n\n\n<li>\n<strong>Alert Thresholds<\/strong>: Trigger alarms if values exceed thresholds.<\/li>\n<\/ol>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Example table structure for configuration:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>CREATE TABLE fields (\n    id INTEGER PRIMARY KEY,\n    name TEXT UNIQUE,\n    validation_rule TEXT,\n    alert_threshold REAL\n);<\/textarea>\n<\/div><code>CREATE TABLE fields (\n    id INTEGER PRIMARY KEY,\n    name TEXT UNIQUE,\n    validation_rule TEXT,\n    alert_threshold REAL\n);<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">API Endpoint to add a field:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>curl -X POST http:\/\/127.0.0.1:5000\/api\/add_field \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\"name\": \"temperature\", \"validation_rule\": \"value &gt;= -50 and value <\/textarea>\n<\/div><code>curl -X POST http:\/\/127.0.0.1:5000\/api\/add_field \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\"name\": \"temperature\", \"validation_rule\": \"value &gt;= -50 and value &lt;= 100\", \"alert_threshold\": 90}'\n<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"server-management-with-api-keys\"><strong>Server Management with API Keys<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">To secure our API, we implemented an <code>api_keys<\/code> system. Each server must register to receive a unique API key. This ensures only authorized systems can send data.<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Register a Server<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>curl -X POST http:\/\/127.0.0.1:5000\/api\/register_server \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\"hostname\": \"server1\", \"ip_address\": \"192.168.1.10\"}'<\/textarea>\n<\/div><code>curl -X POST http:\/\/127.0.0.1:5000\/api\/register_server \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\"hostname\": \"server1\", \"ip_address\": \"192.168.1.10\"}'<\/code><\/pre>\n\n\n<ol class=\"wp-block-list wp-block-list\"><\/ol>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">The response includes a unique API key:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>{\n    \"status\": \"success\",\n    \"hostname\": \"server1\",\n    \"ip_address\": \"192.168.1.10\",\n    \"api_key\": \"3c5d8974-6f7a-11ed-81ce-0242ac120002\"\n}<\/textarea>\n<\/div><code>{\n    \"status\": \"success\",\n    \"hostname\": \"server1\",\n    \"ip_address\": \"192.168.1.10\",\n    \"api_key\": \"3c5d8974-6f7a-11ed-81ce-0242ac120002\"\n}<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Reset an API Key<\/strong> If a key is compromised:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>curl -X POST http:\/\/127.0.0.1:5000\/api\/reset_api_key \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\"hostname\": \"server1\"}'<\/textarea>\n<\/div><code>curl -X POST http:\/\/127.0.0.1:5000\/api\/reset_api_key \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\"hostname\": \"server1\"}'<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"validating-requests\"><strong>Validating Requests<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">When data is submitted, the API validates:<\/p>\n\n\n<ul class=\"wp-block-list wp-block-list\">\n<li>\n<strong>API Key<\/strong>: Is it associated with the correct hostname or IP?<\/li>\n\n\n\n<li>\n<strong>Data Fields<\/strong>: Are the values valid as per the configuration?<\/li>\n<\/ul>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Example request:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>curl -X POST http:\/\/127.0.0.1:5000\/api\/submit \\\n     -H \"Content-Type: application\/json\" \\\n     -H \"X-API-Key: 3c5d8974-6f7a-11ed-81ce-0242ac120002\" \\\n     -d '{\"field\": \"temperature\", \"value\": 85}'<\/textarea>\n<\/div><code>curl -X POST http:\/\/127.0.0.1:5000\/api\/submit \\\n     -H \"Content-Type: application\/json\" \\\n     -H \"X-API-Key: 3c5d8974-6f7a-11ed-81ce-0242ac120002\" \\\n     -d '{\"field\": \"temperature\", \"value\": 85}'<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"listing-registered-servers\"><strong>Listing Registered Servers<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">For administrative purposes, you can fetch all registered servers:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>curl -X GET http:\/\/127.0.0.1:5000\/api\/list_servers<\/textarea>\n<\/div><code>curl -X GET http:\/\/127.0.0.1:5000\/api\/list_servers<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"building-a-future-proof-api\"><strong>Building a Future-Proof API<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">With these enhancements, the API is ready to handle:<\/p>\n\n\n<ol class=\"wp-block-list wp-block-list\">\n<li>\n<strong>Dynamic Metrics<\/strong>: Add fields without changing the code.<\/li>\n\n\n\n<li>\n<strong>Security<\/strong>: Protect data with server-specific API keys.<\/li>\n\n\n\n<li>\n<strong>Custom Validation<\/strong>: Ensure data integrity with configurable rules.<\/li>\n\n\n\n<li>\n<strong>Scalability<\/strong>: Easily extend to accommodate more metrics and servers.<\/li>\n<\/ol>\n\n\n<h3 class=\"wp-block-heading\" id=\"code-overview\"><strong>Code Overview<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Check out our downloads section for all code of this api and test it yourself.<\/p>\n\n\n<ul class=\"wp-block-list wp-block-list\"><\/ul>\n\n\n<h3 class=\"wp-block-heading\" id=\"whate28099s-next\"><strong>What&rsquo;s Next?<\/strong><\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">In the next iteration, we plan to:<\/p>\n\n\n<ol class=\"wp-block-list wp-block-list\">\n<li>Add notification mechanisms for alert thresholds.<\/li>\n\n\n\n<li>Integrate with machine learning for predictive analytics.<\/li>\n\n\n\n<li>Implement real-time dashboards for better visualization.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">This project demonstrates how to build a secure and flexible API for custom monitoring needs. Whether tracking server updates, monitoring temperature sensors, or gathering business metrics, this API is ready to adapt to your requirements.<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a world where infrastructure monitoring is vital, having a flexible and secure way to collect and process custom data is essential. In this blog post, we&rsquo;ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers. We&rsquo;ll walk &hellip;<\/p>\n","protected":false},"author":1,"featured_media":371,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,46,16],"tags":[29,15,17],"class_list":["post-369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-future-ideas","category-howto","category-tech-innovation","tag-ai","tag-api","tag-machine-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building a Secure, Configurable, and Scalable Monitoring API - SystemDeveloper.NL<\/title>\n<meta name=\"description\" content=\"In this blog post, we\u2019ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Secure, Configurable, and Scalable Monitoring API - SystemDeveloper.NL\" \/>\n<meta property=\"og:description\" content=\"In this blog post, we\u2019ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/\" \/>\n<meta property=\"og:site_name\" content=\"SystemDeveloper.NL\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/quan.tora.16\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-16T19:53:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-16T19:53:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"John Timmer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Timmer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/\"},\"author\":{\"name\":\"John Timmer\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/person\\\/5760c2ed5300c56d8ef01dfb00a9763b\"},\"headline\":\"Building a Secure, Configurable, and Scalable Monitoring API\",\"datePublished\":\"2024-11-16T19:53:44+00:00\",\"dateModified\":\"2024-11-16T19:53:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/\"},\"wordCount\":380,\"publisher\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp\",\"keywords\":[\"AI\",\"API\",\"Machine Learning\"],\"articleSection\":[\"Future ideas\",\"Howto\",\"Tech Innovation\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/\",\"name\":\"Building a Secure, Configurable, and Scalable Monitoring API - SystemDeveloper.NL\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp\",\"datePublished\":\"2024-11-16T19:53:44+00:00\",\"dateModified\":\"2024-11-16T19:53:45+00:00\",\"description\":\"In this blog post, we\u2019ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp\",\"contentUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp\",\"width\":1024,\"height\":768,\"caption\":\"Building a Secure, Configurable, and Scalable Monitoring API\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/building-a-secure-configurable-and-scalable-monitoring-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Secure, Configurable, and Scalable Monitoring API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#website\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/\",\"name\":\"www.systemdeveloper.nl\",\"description\":\"NextGen IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#organization\",\"name\":\"www.systemdeveloper.nl\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/qt-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/qt-logo.png\",\"width\":1346,\"height\":1230,\"caption\":\"www.systemdeveloper.nl\"},\"image\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/quan.tora.16\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/person\\\/5760c2ed5300c56d8ef01dfb00a9763b\",\"name\":\"John Timmer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg\",\"caption\":\"John Timmer\"},\"sameAs\":[\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\"],\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Secure, Configurable, and Scalable Monitoring API - SystemDeveloper.NL","description":"In this blog post, we\u2019ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/","og_locale":"en_US","og_type":"article","og_title":"Building a Secure, Configurable, and Scalable Monitoring API - SystemDeveloper.NL","og_description":"In this blog post, we\u2019ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.","og_url":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/","og_site_name":"SystemDeveloper.NL","article_publisher":"https:\/\/www.facebook.com\/quan.tora.16","article_published_time":"2024-11-16T19:53:44+00:00","article_modified_time":"2024-11-16T19:53:45+00:00","og_image":[{"width":1024,"height":768,"url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp","type":"image\/webp"}],"author":"John Timmer","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Timmer","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#article","isPartOf":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/"},"author":{"name":"John Timmer","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/person\/5760c2ed5300c56d8ef01dfb00a9763b"},"headline":"Building a Secure, Configurable, and Scalable Monitoring API","datePublished":"2024-11-16T19:53:44+00:00","dateModified":"2024-11-16T19:53:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/"},"wordCount":380,"publisher":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#organization"},"image":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp","keywords":["AI","API","Machine Learning"],"articleSection":["Future ideas","Howto","Tech Innovation"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/","url":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/","name":"Building a Secure, Configurable, and Scalable Monitoring API - SystemDeveloper.NL","isPartOf":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#primaryimage"},"image":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp","datePublished":"2024-11-16T19:53:44+00:00","dateModified":"2024-11-16T19:53:45+00:00","description":"In this blog post, we\u2019ll take you through building an API that not only allows for dynamic field configurations but also includes robust security with API keys tied to specific servers.","breadcrumb":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#primaryimage","url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp","contentUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/00543294-edfc-4990-bc1c-e8a3f7fd626e-e1731786752444.webp","width":1024,"height":768,"caption":"Building a Secure, Configurable, and Scalable Monitoring API"},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemdeveloper.nl\/tech\/building-a-secure-configurable-and-scalable-monitoring-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemdeveloper.nl\/tech\/"},{"@type":"ListItem","position":2,"name":"Building a Secure, Configurable, and Scalable Monitoring API"}]},{"@type":"WebSite","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#website","url":"https:\/\/www.systemdeveloper.nl\/tech\/","name":"www.systemdeveloper.nl","description":"NextGen IT","publisher":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemdeveloper.nl\/tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#organization","name":"www.systemdeveloper.nl","url":"https:\/\/www.systemdeveloper.nl\/tech\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/qt-logo.png","contentUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/qt-logo.png","width":1346,"height":1230,"caption":"www.systemdeveloper.nl"},"image":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/quan.tora.16"]},{"@type":"Person","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/person\/5760c2ed5300c56d8ef01dfb00a9763b","name":"John Timmer","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg","url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg","contentUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg","caption":"John Timmer"},"sameAs":["https:\/\/www.systemdeveloper.nl\/tech"],"url":"https:\/\/www.systemdeveloper.nl\/tech\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts\/369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/comments?post=369"}],"version-history":[{"count":2,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts\/369\/revisions\/372"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/media\/371"}],"wp:attachment":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/media?parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/categories?post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/tags?post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}