Complete Guide: Automated Server Monitoring Setup with Alerts for SIMRS & Clinics
T
Kembali ke Blog

Complete Guide: Automated Server Monitoring Setup with Alerts for SIMRS & Clinics

Teknologi
Tim Pilar Inovasi 15 Jul 2026 7 min baca 3,325 kata 200
Learn how to set up automated server monitoring with Prometheus, Grafana, and Alertmanager for your SIMRS & Clinic. This article covers the concepts, implementation, alert configuration, and best practices for keeping healthcare systems optimal 24/7.

In today's era of healthcare digitalization, the availability and performance of information systems such as SIMRS (Hospital Management Information System) and Clinic MIS are the backbone of operations. Imagine a scenario where the SIMRS server experiences performance degradation or even goes down for one hour. The impact can be very broad: dozens of patient registrations are hindered, long queues at the counter, medical record data cannot be accessed, the BPJS or SatuSehat bridging process stops, and even potential financial losses due to service delays. According to our internal data from several implementations, on average one hour of SIMRS downtime can disrupt more than 60 patient transactions and cause critical delays in laboratory or pharmacy services. Often, problems are only detected after there are complaints from users or patients, which means it is already too late. To overcome this challenge, automating server monitoring with an alert system becomes a necessity, no longer an option. This article will guide you in depth, step by step, in building a robust and effective monitoring system using industry-standard tools such as Prometheus, Grafana, and Alertmanager, ensuring your SIMRS and Clinic MIS always operate at peak performance.

Basic Concepts of Server Monitoring for SIMRS & Clinics

Server monitoring in the context of SIMRS and Clinic MIS has a much higher urgency compared to IT systems in general. This is not only about maintaining uptime, but also about patient safety, regulatory compliance (such as PMK 82/2023 concerning Electronic Medical Records), and the smooth running of vital services. The availability of medical record data, the speed of access to patient information, and the reliability of integration with external systems such as BPJS Kesehatan or the SatuSehat platform are highly dependent on the health of the server infrastructure.

There are several types of monitoring that must be the main focus:

  • Host-level Monitoring: Monitoring the server's basic resources such as CPU usage, memory (RAM), disk I/O activity, and network traffic. These metrics provide a general overview of the server's workload. Example: If the CPU is continuously above 80% for 10 minutes, this is an indication that the server is overwhelmed.
  • Application-level Monitoring: Monitoring the status and performance of the SIMRS application itself. This includes the availability of web services (for example, Nginx or Apache), application process status, API response time (for example, the patient registration API), and specific metrics exposed by the application.
  • Database Monitoring: Because the database is the heart of SIMRS, its monitoring is very crucial. The metrics monitored include the number of active connections, query latency, database disk usage, cache hit rate, and replication status (if any). PostgreSQL version 16, for example, has many performance metrics that can be extracted.
  • Network-level Monitoring: Monitoring network connectivity and latency between servers, or between the SIMRS server and external services (BPJS, SatuSehat). Packet loss or high latency can disrupt vital integration.

For SIMRS and Clinics, key metrics that must always be monitored include: average CPU usage (above 85% for 5 minutes is critical), remaining available memory (below 10% of total RAM is a warning), disk I/O per second (high latency > 50ms per I/O operation can hinder the DB), the number of active database connections (exceeding the pool size can cause errors), and the response time of the main SIMRS API (for example, the patient registration API > 500ms). In addition, ensure that bridging services such as BPJS VClaim or SatuSehat always have 'UP' status and that no data queues are piling up.

An effective monitoring system consists of several components: a data collector, data storage, data visualization, and an alerting system. Prometheus is a very popular choice for collecting and storing time-series metrics, Grafana for interactive dashboard visualization, and Alertmanager for intelligent alert notification management and delivery. This combination offers a powerful, flexible, and scalable monitoring solution for SIMRS and Clinic environments.

Implementation Details: Building Monitoring Infrastructure

Building reliable monitoring infrastructure for SIMRS and Clinics requires choosing the right tools and careful configuration. In this guide, we will focus on a popular stack: Prometheus (version 2.45.0) as the metrics collection engine, Node Exporter (version 1.7.0) for host metrics, PostgreSQL Exporter (version 0.13.0) for database metrics, Grafana (version 10.4.2) as the visualization platform, and Alertmanager (version 0.27.0) for notifications. All of these components will be installed on an Ubuntu Server 22.04 LTS server.

The first step is to prepare Prometheus. Download the Prometheus binary version 2.45.0 from its official website, extract it, and place it in an appropriate location, for example /usr/local/bin/prometheus. Its main configuration file is prometheus.yml. The basic configuration will include `scrape_interval` (for example, 15 seconds) and `evaluation_interval` (for example, 15 seconds) for alert rules. Ensure Prometheus runs as a systemd service for easy management. An example initial configuration will include targets for Prometheus itself (`localhost:9090`) and Node Exporter which we will install next.

Next, we will deploy Node Exporter (version 1.7.0) to each server we want to monitor, including the SIMRS application server and the database server. Node Exporter is a tool that exposes basic system metrics (CPU, RAM, Disk, Network) in a format readable by Prometheus on the default port 9100. After being downloaded and extracted, Node Exporter must also be run as a systemd service. Then, add each Node Exporter target to your prometheus.yml configuration under the scrape_configs section. For example, if your SIMRS application server has the IP 192.168.1.10, you would add the entry - job_name: 'simrs_app_server' static_configs: - targets: ['192.168.1.10:9100'].

For monitoring the PostgreSQL database (for example, PostgreSQL 16.x), we will use PostgreSQL Exporter (version 0.13.0). This exporter connects to the PostgreSQL database and exposes database-specific metrics such as the number of connections, replication status, and query statistics. Install PostgreSQL Exporter on the database server, configure it with the appropriate database credentials (use a user with read-only access to the metrics), and run it as a systemd service. Don't forget to add the PostgreSQL Exporter target to your prometheus.yml, usually on port 9187. It is important to secure these database credentials, for example by using environment variables or a separate protected file.

Finally, integrate Grafana (version 10.4.2) for visualization. Install Grafana using the official APT repository, then access it via a browser on the default port 3000. Add Prometheus as a data source in Grafana. After that, you can import ready-made dashboards from Grafana Labs (for example, Node Exporter Full Dashboard ID 1860, PostgreSQL Overview Dashboard ID 9628) or create custom dashboards that display your key SIMRS metrics. Clear visualization will help the IT team quickly identify problems and performance trends.

Configuring Alerting with Prometheus & Alertmanager

A monitoring system without an alerting system is like a surveillance camera without an alarm. Prometheus and Alertmanager work together to provide smart and managed notifications. Prometheus is responsible for evaluating alert rules based on the collected metrics, while Alertmanager handles deduplication, grouping, and routing of notifications to the right recipients.

First, we define alert rules in Prometheus. These rules are stored in a separate file, for example alert.rules.yml, which is then referenced in prometheus.yml. Each alert rule has a name (`alert`), a PromQL expression (`expr`) that must be evaluated, a duration (`for`) the expression must be true before the alert fires, as well as labels and annotations to provide context. Labels are used by Alertmanager for grouping, while annotations provide a more detailed description.

groups:  - name: simrs_server_alerts    rules:    - alert: HighCPUUsage      expr: 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 85      for: 5m      labels:        severity: critical        service: SIMRS-App      annotations:        summary: "CPU usage on {{ $labels.instance }} is high"        description: "CPU utilization is above 85% for 5 minutes. This can impact SIMRS performance. Current value: {{ $value | humanize }}%"    - alert: HighMemoryUsage      expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100 > 90      for: 10m      labels:        severity: warning        service: SIMRS-DB      annotations:        summary: "Memory usage on {{ $labels.instance }} is high"        description: "Memory utilization is above 90% for 10 minutes. This could lead to OOM errors. Current value: {{ $value | humanize }}%"

In the example above, we have two rules: HighCPUUsage will fire if the average CPU usage is above 85% for 5 minutes, with a severity of 'critical'. The HighMemoryUsage alert will fire if memory usage is above 90% for 10 minutes, with a severity of 'warning'. The for duration is very important to prevent 'flapping alerts' that are too sensitive. After creating this file, add the line rule_files: - "/etc/prometheus/alert.rules.yml" to prometheus.yml and restart Prometheus.

Next, we will configure Alertmanager (version 0.27.0). Its main configuration file is alertmanager.yml. Here we determine how alerts will be routed and to whom notifications will be sent. Alertmanager allows you to group similar alerts to avoid notification spam, delay sending, or even suppress certain alerts based on conditions.

global:  resolve_timeout: 5mroute:  receiver: 'email-ops'  group_by: ['alertname', 'instance']  group_wait: 30s  group_interval: 5m  repeat_interval: 1h  routes:  - match:      severity: 'critical'    receiver: 'email-ops'  - match:      severity: 'warning'    receiver: 'email-dev'receivers:- name: 'email-ops'  email_configs:  - to: 'ops@nugrohosetiawan.com'    from: 'alertmanager@nugrohosetiawan.com'    smarthost: 'smtp.yourcompany.com:587'    auth_username: 'alertmanager@yourcompany.com'    auth_password: 'your_smtp_password'    require_tls: true- name: 'email-dev'  email_configs:  - to: 'dev@nugrohosetiawan.com'    from: 'alertmanager@yourcompany.com'    smarthost: 'smtp.yourcompany.com:587'    auth_username: 'alertmanager@yourcompany.com'    auth_password: 'your_smtp_password'    require_tls: true

The Alertmanager configuration above defines two receivers: email-ops for the operations team and email-dev for the development team. Alerts with 'critical' severity will be routed to email-ops, while those with 'warning' go to email-dev. The parameters group_by, group_wait, group_interval, and repeat_interval help manage the flood of notifications. For example, group_by: ['alertname', 'instance'] will group alerts with the same name and instance into a single notification. After configuration, run Alertmanager as a systemd service and ensure Prometheus is configured to send alerts to Alertmanager.

Application-Specific Monitoring & Incident Handling

In addition to monitoring basic infrastructure, application-specific monitoring of SIMRS is key to detecting issues that only appear at the application level. This involves instrumenting the SIMRS application code itself to expose custom metrics. For example, you can monitor the response time of the patient registration API, the number of failed transactions to BPJS, or the message queue to SatuSehat. Many programming languages have Prometheus client libraries (e.g., Go client, Java client, Python client) that make it easy to expose custom metrics.

As an example, let's consider a failure scenario in bridging to the SatuSehat platform. Every patient data transaction to SatuSehat, such as new patient registration or condition update, involves sending a FHIR (Fast Healthcare Interoperability Resources) payload through the API. Failures in this process can be caused by various factors, ranging from network issues, invalid data formats, to authentication problems.

The following is an example FHIR payload (Resource Type: Patient) that your SIMRS might send to SatuSehat:

{  "resourceType": "Patient",  "id": "example-patient-id-123",  "identifier": [    {      "system": "http://terminology.kemkes.go.id/CodeSystem/patient-identifier",      "value": "NIK-3276010101800001",      "use": "official"    },    {      "system": "http://terminology.kemkes.go.id/CodeSystem/kemkesid",      "value": "ID00012345678"    }  ],  "name": [    {      "use": "official",      "text": "Budi Santoso"    }  ],  "gender": "male",  "birthDate": "1980-01-01",  "address": [    {      "use": "home",      "line": [        "Jl. Raya Contoh No. 10"      ],      "city": "Jakarta",      "postalCode": "12345",      "country": "ID"    }  ]}

If the above payload fails to be processed by the SatuSehat API, you might receive an error response like this:

HTTP 422 Unprocessable Entity - "The NIK 'NIK-3276010101800001' is not registered in Dukcapil or already exists with different demographic data. Please verify the patient's identity."

To handle incidents like this, you need to:

  1. Trigger Alert: Configure Prometheus to trigger an alert if the metric `simrs_satusehat_bridging_failure_total` increases above zero within a certain time period (e.g., `rate(simrs_satusehat_bridging_failure_total[5m]) > 0`).
  2. Action Plan (Runbook): After the alert is received (e.g., via email to the IT team), the team must have a clear runbook:
    • Verify NIK: Compare the patient's NIK in SIMRS with valid Dukcapil data or data already in SatuSehat. Check if there are demographic differences.
    • Check Application Logs: Check the SIMRS application logs for more specific error details related to the SatuSehat transaction.
    • Check Connectivity: Ensure the SIMRS server has stable connectivity to the SatuSehat API endpoint (`https://api-satusehat.kemkes.go.id/fhir-r4`).
    • Validate Payload: Ensure the FHIR payload format complies with the FHIR R4 standard and the profile defined by the Ministry of Health for SatuSehat.
    • Escalate: If the problem persists and is not due to invalid data, escalate to the development team or SatuSehat support contact.

Having a well-defined runbook for each type of alert is key to fast response times and efficient incident handling, minimizing negative impacts on SIMRS operations and patient services.

Best Practices

Implementing effective automated server monitoring for SIMRS and Clinics does not stop at tool installation, but also requires best practices so that this system truly provides optimal and sustainable value. Here are some best practices you should consider:

  1. Start with the Critical and Prioritize: Don't try to monitor everything at once. Identify the most vital components in your SIMRS/Clinic ecosystem, such as the database, main application server, and bridging services (BPJS, SatuSehat). Focus on metrics that directly affect the availability and performance of core services, then gradually expand monitoring coverage.
  2. Define Appropriate and Dynamic Thresholds: Use historical data to set realistic alert thresholds. Avoid thresholds that are too low (causing 'alert fatigue' or false positives) or too high (missing real problems). Consider using adaptive or percentile-based thresholds for metrics that vary seasonally or based on workload. For example, CPU usage > 85% for 5 minutes may be more appropriate than > 70% for 1 minute.
  3. Implement Redundancy for the Monitoring System Itself: Ensure your monitoring system (Prometheus, Alertmanager) has redundancy. If the primary monitoring server goes down, you won't receive any alerts. Consider High Availability (HA) deployment for Prometheus or use a cloud-based monitoring service that already has built-in redundancy.
  4. Regularly Test Alerts and Simulate Incidents: Periodically test your alert rules to ensure they trigger correctly and notifications are received by the right parties. Simulating minor incidents, such as temporarily shutting down a service or filling up a disk, can help validate the effectiveness of your alerting system and your team's readiness.
  5. Document Clear Runbooks for Each Alert: Every alert should be accompanied by a detailed runbook or Standard Operating Procedure (SOP). This runbook should include potential causes, initial verification steps, temporary solutions, and escalation procedures. Good documentation speeds up response time and reduces dependence on specific individuals.
  6. Utilize Informative and Relevant Visual Dashboards: Create easy-to-read Grafana dashboards that display key metrics in real-time. Tailor dashboards for different audiences (for example, technical dashboards for IT Ops teams, summary dashboards for management). Good visualization helps teams quickly identify patterns, trends, and root causes, rather than just reacting to alerts.
  7. Integrate with Appropriate Notification and ITSM Systems: Choose notification channels that match the severity level of the alert (for example, email for warnings, Slack/Telegram for info, SMS/Calls for critical). Consider integrating Alertmanager with your ITSM (IT Service Management) system, such as Jira or ServiceNow, to automate incident ticket creation, which can streamline the problem-handling workflow.
  8. Regularly Review and Adjust Configuration: The IT environment is always changing. Review monitoring configurations, thresholds, and runbooks at least every quarter, or whenever there are significant changes to the infrastructure, SIMRS application updates, or new usage patterns. Ensure your monitoring system remains relevant and effective over time.
  9. Security of the Monitoring System: Secure the monitoring server and access to dashboards and configurations. Use strong authentication (for example, MFA), role-based authorization (RBAC), and communication encryption to protect sensitive data collected. The monitoring system is an attractive target for attackers because it contains information about the health of your entire infrastructure.

FAQ

Here are some common questions about automated server monitoring for SIMRS and Clinics:

Q1: What is the difference between monitoring and logging?
A1: Monitoring focuses on numerical metrics and system status (for example, CPU usage, number of DB connections, API response time) measured periodically to gauge performance and availability, often visualized in graphs. Logging is the recording of discrete events (for example, user logins, application errors, failed database transactions) that occur in the system, usually in the form of structured text. Both complement each other: monitoring tells you 'there is a problem' or 'performance is degrading', while logging helps you understand 'why the problem occurred' by providing contextual details of each event.

Q2: How often should I review my alerts and thresholds?
A2: Ideally, review your alerts and thresholds at least every quarter, or more often if there are significant changes to the infrastructure, new version releases of your SIMRS application, or changing usage patterns. System performance can fluctuate over time, and irrelevant thresholds can cause 'alert fatigue' (too many false notifications) or worse, 'false negatives' (failing to detect real problems).

Q3: Can this monitoring system be integrated with an existing ticketing (ITSM) system?
A3: Yes, Alertmanager is designed to be flexible in integration. It can be integrated with various popular ITSM ticketing systems such as Jira, ServiceNow, GLPI, or even custom systems via webhooks or special plugins. When an alert is triggered, Alertmanager can automatically create a new ticket in your ITSM system, speeding up the incident handling process and ensuring no issues are missed.

Q4: What should I do if I receive too many alerts (alert fatigue)?
A4: Alert fatigue is a common problem that can cause IT teams to ignore important notifications. To overcome it, first, review your thresholds and make sure they are realistic based on performance baselines. Second, take advantage of Alertmanager's grouping and deduplication features to consolidate similar alerts into a single notification. Third, prioritize alerts based on severity and ensure that only truly actionable alerts trigger high-priority notifications.

Q5: Does this server monitoring meet health data security standards such as PMK 82/2023 or HIPAA?
A5: Server monitoring directly supports the availability and integrity aspects of data mandated by compliance standards such as PMK 82/2023 or HIPAA, because it helps prevent downtime and detect anomalies. However, a monitoring system is not a single compliance solution. It is an integral part of a broader security and compliance strategy, which also involves strict access controls, data encryption, audit trails, privacy policies, and staff training to ensure the protection of patient health data.

Q6: How do I monitor database performance in depth, especially for the PostgreSQL used by SIMRS?
A6: For in-depth PostgreSQL monitoring, in addition to Node Exporter, you must use PostgreSQL Exporter for database-specific metrics such as the number of active connections, cache hit rate, transactions per second, locks that occur, and replication lag (if a replication setup exists). Make sure you also enable and monitor slow queries through `pg_stat_statements` or the database log. Use Grafana to visualize database performance trends over time, enabling identification of query bottlenecks or suboptimal configurations.

Implementing an automated server monitoring system with alerts for SIMRS and Clinics is no longer a luxury, but a crucial investment to maintain operational smoothness, ensure patient safety, and meet health regulatory standards. With Prometheus, Grafana, and Alertmanager, you can build a strong foundation for a proactive and responsive healthcare IT infrastructure. The ability to detect problems before they have a wide impact, respond to incidents quickly, and analyze performance trends will significantly improve IT team efficiency and minimize losses due to downtime. If you need implementation assistance, in-depth consultation for SIMRS, Clinic SIM, or BPJS/SatuSehat/FHIR bridging integration, our team at Nugroho Setiawan is ready to help. We are committed to providing reliable and scalable technology solutions, ensuring your health information systems always run optimally and support the best service for the community.

Related solutions by PT Pilar Inovasi Informatika (Pilar Inovasi IT products): SIMRS (Hospital Information System) BPJS & SatuSehat Integration. Need a free consultation?

Terakhir diperbarui 18 Oct 2026

Komentar

Komentar ditinjau sebelum tampil.

Belum ada komentar. Jadilah yang pertama!