{"id":46804,"date":"2024-06-17T00:00:00","date_gmt":"2024-06-17T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/monitor-spring-boot\/"},"modified":"2025-11-13T12:57:02","modified_gmt":"2025-11-13T20:57:02","slug":"monitor-spring-boot","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/monitor-spring-boot\/","title":{"rendered":"Real-time Infrastructure Monitoring Using GridDB and Spring Boot"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>In today&#8217;s fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection and resolution of performance issues are critical to prevent downtime, maintain user satisfaction, and optimize resource utilization. Traditional monitoring methods, often relying on intermittent checks and fragmented data sources, struggle to keep pace with the real-time demands of modern applications.<\/p>\n<p>This is where real-time monitoring systems come into play. These applications continuously collect and analyze data, offering a comprehensive view of system health and performance. By proactively identifying anomalies and potential issues, real-time monitoring empowers us to take corrective actions swiftly, minimizing disruptions and ensuring application uptime.<\/p>\n<p>This article explores the power of GridDB, a high-performance time-series database, coupled with Spring Boot, a popular Java framework, to build a robust real-time monitoring system. We&#8217;ll delve into a practical use case, outlining each step involved in creating this monitoring solution, from setting up the GridDB cluster and configuring the Spring Boot application to implementing alerting mechanisms and notification systems.<\/p>\n<h2>Setting Up GridDB Cluster and Spring Boot Integration: For Real-Time Monitoring<\/h2>\n<p>The first step in building our real-time monitoring system involves establishing a solid foundation. This comprises setting up a GridDB cluster and configuring our Spring Boot application to communicate seamlessly with it.<\/p>\n<ul>\n<li><strong>Setting up GridDB Cluster<\/strong><\/li>\n<\/ul>\n<p>GridDB offers diverse options to cater to various needs. For development environments, a single-node cluster on your local machine might suffice. however, Production environments often benefit from distributed clusters spread across multiple machines for enhanced fault tolerance and scalability. Refer to the GridDB documentation for detailed instructions on cluster setup based on your chosen deployment strategy.<\/p>\n<p>To set up a GridDB cluster, follow these steps mentioned <a href=\"https:\/\/docs.griddb.net\/gettingstarted\/using-apt\/#install-with-apt-get\">here<\/a>.<\/p>\n<ul>\n<li><strong>Setting up Spring Boot Application<\/strong><\/li>\n<\/ul>\n<p>Once your GridDB cluster is up and running, it&#8217;s time to connect your Spring Boot application. The GridDB Java Client API provides the essential tools for establishing this communication channel. Fortunately, libraries like <code>griddb-spring-boot-starter<\/code> can simplify this process. By including this library as a dependency in your project, you gain access to pre-configured beans that streamline the connection setup.<\/p>\n<p>Within your Spring Boot application, you&#8217;ll typically configure connection details like cluster names, hostnames, and authentication credentials. These configurations are usually defined in a properties file or directly within your Spring Boot configuration class. With the connection established, your Spring Boot application is now poised to interact with the GridDB cluster and leverage its capabilities for storing and managing your performance metrics.<\/p>\n<p><strong>Project Structure<\/strong><\/p>\n<p>Here&#8217;s a suggested project structure for such an application:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">.\n\u251c\u2500\u2500 pom.xml\n\u251c\u2500\u2500 src\n\u2502   \u251c\u2500\u2500 main\n\u2502   \u2502   \u251c\u2500\u2500 java\n\u2502   \u2502   \u2502   \u2514\u2500\u2500 mycode\n\u2502   \u2502   \u2502       \u251c\u2500\u2500 config\n\u2502   \u2502   \u2502       \u2502   \u2514\u2500\u2500 GridDBConfig.java\n\u2502   \u2502   \u2502       \u251c\u2500\u2500 dto\n\u2502   \u2502   \u2502       \u2502   \u2514\u2500\u2500 CpuMetric.java\n\u2502   \u2502   \u2502       \u251c\u2500\u2500 MySpringBootApplication.java\n\u2502   \u2502   \u2502       \u2514\u2500\u2500 service\n\u2502   \u2502   \u2502           \u251c\u2500\u2500 AlertingService.java\n\u2502   \u2502   \u2502           \u2514\u2500\u2500 MetricsCollectionService.java\n\u2502   \u2502   \u2514\u2500\u2500 resources\n\u2502   \u2502       \u2514\u2500\u2500 application.properties<\/code><\/pre>\n<\/div>\n<p>This structure delineates distinct layers for controllers, models, repositories, services, and the application entry point, promoting modularity and maintainability. Additionally, it encompasses resource files such as application properties and logging configurations, alongside testing suites for ensuring robustness.<\/p>\n<p><strong>Add GridDB Dependency<\/strong><\/p>\n<p>To interact with GridDB in your Spring Boot project, you&#8217;ll need to include the GridDB Java Client API dependency. This can be done by adding the necessary configuration to your project&#8217;s build file, either <code>pom.xml<\/code> for Maven or the equivalent file for Gradle.<\/p>\n<p>Here&#8217;s an example of how to configure the dependency in your <code>pom.xml<\/code> file:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">&lt;project \n  xmlns_xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n  xsi_schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/maven-v4_0_0.xsd\"&gt;\n  &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\n  &lt;groupId&gt;com.example&lt;\/groupId&gt;\n  &lt;artifactId&gt;my-griddb-app&lt;\/artifactId&gt;\n  &lt;version&gt;1.0-SNAPSHOT&lt;\/version&gt;\n  &lt;name&gt;my-griddb-app&lt;\/name&gt;\n  &lt;url&gt;http:\/\/maven.apache.org&lt;\/url&gt;\n  &lt;parent&gt;\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n    &lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;\n    &lt;version&gt;3.2.4&lt;\/version&gt;\n    &lt;relativePath \/&gt; &lt;!-- lookup parent from repository --&gt;\n  &lt;\/parent&gt;\n  &lt;properties&gt;\n    &lt;maven.compiler.source&gt;17&lt;\/maven.compiler.source&gt;\n    &lt;maven.compiler.target&gt;17&lt;\/maven.compiler.target&gt;\n  &lt;\/properties&gt;\n\n  &lt;dependencies&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n      &lt;artifactId&gt;spring-boot-starter-actuator&lt;\/artifactId&gt;\n    &lt;\/dependency&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;junit&lt;\/groupId&gt;\n      &lt;artifactId&gt;junit&lt;\/artifactId&gt;\n      &lt;version&gt;3.8.1&lt;\/version&gt;\n      &lt;scope&gt;test&lt;\/scope&gt;\n    &lt;\/dependency&gt;\n    &lt;!-- https:\/\/mvnrepository.com\/artifact\/com.github.griddb\/gridstore-jdbc --&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;com.github.griddb&lt;\/groupId&gt;\n      &lt;artifactId&gt;gridstore-jdbc&lt;\/artifactId&gt;\n      &lt;version&gt;5.3.0&lt;\/version&gt;\n    &lt;\/dependency&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;com.github.griddb&lt;\/groupId&gt;\n      &lt;artifactId&gt;gridstore&lt;\/artifactId&gt;\n      &lt;version&gt;5.5.0&lt;\/version&gt;\n    &lt;\/dependency&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n      &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n      &lt;exclusions&gt;\n        &lt;exclusion&gt;\n          &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n          &lt;artifactId&gt;spring-boot-starter-logging&lt;\/artifactId&gt;\n        &lt;\/exclusion&gt;\n      &lt;\/exclusions&gt;\n    &lt;\/dependency&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n      &lt;artifactId&gt;spring-boot-starter-test&lt;\/artifactId&gt;\n      &lt;scope&gt;test&lt;\/scope&gt;\n    &lt;\/dependency&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;org.projectlombok&lt;\/groupId&gt;\n      &lt;artifactId&gt;lombok&lt;\/artifactId&gt;\n      &lt;optional&gt;true&lt;\/optional&gt;\n    &lt;\/dependency&gt;\n  &lt;\/dependencies&gt;\n&lt;\/project&gt;<\/code><\/pre>\n<\/div>\n<p><strong>Configure GridDB Connection<\/strong><\/p>\n<p>Once you&#8217;ve added the GridDB dependency, configure the connection details for your GridDB cluster in your Spring Boot application properties file (typically named <code>application.properties<\/code>). This file allows you to define various application settings.<\/p>\n<p>Here&#8217;s an example of how to configure the connection details:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">GRIDDB_NOTIFICATION_MEMBER=127.0.0.1:10001\nGRIDDB_CLUSTER_NAME=myCluster\nGRIDDB_USER=admin\nGRIDDB_PASSWORD=admin\nmanagement.endpoints.web.exposure.include=*<\/code><\/pre>\n<\/div>\n<ul>\n<li><code>griddb.cluster.host<\/code>: The hostname or IP address of your GridDB cluster.<\/li>\n<li><code>griddb.cluster.port<\/code>: The port number on which the GridDB cluster is listening.<\/li>\n<li><code>griddb.cluster.user<\/code>: The username for accessing the GridDB cluster.<\/li>\n<li><code>griddb.cluster.password<\/code>: The password for the specified GridDB user (replace with your actual password).<\/li>\n<\/ul>\n<p><strong>Create GridDB Client Bean<\/strong><\/p>\n<p>Create a Spring Bean to initialize the GridDB connection using the configured parameters. This bean will be used to interact with the GridDB cluster throughout your application. This is done in GridDbConfig.java as below interacts with GridDB effectively in your Spring Boot application, you&#8217;ll need a dedicated bean to manage the GridDB connection. This bean will be responsible for initializing the connection using the configuration parameters you specified in the <code>application.properties<\/code> file. Once created, this bean will serve as a central point for interacting with the GridDB cluster throughout your application.<\/p>\n<p>Here&#8217;s an example of how to define such a bean in a Java class named <code>GridDbConfig.java<\/code>:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package mycode.config;\n\nimport java.util.Properties;\n\nimport org.springframework.beans.factory.annotation.Value;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.context.annotation.PropertySource;\n\nimport com.toshiba.mwcloud.gs.GSException;\nimport com.toshiba.mwcloud.gs.GridStore;\nimport com.toshiba.mwcloud.gs.GridStoreFactory;\n\n@Configuration\n@PropertySource(\"classpath:application.properties\")\npublic class GridDBConfig {\n\n  @Value(\"${GRIDDB_NOTIFICATION_MEMBER}\")\n  private String notificationMember;\n\n  @Value(\"${GRIDDB_CLUSTER_NAME}\")\n  private String clusterName;\n\n  @Value(\"${GRIDDB_USER}\")\n  private String user;\n\n  @Value(\"${GRIDDB_PASSWORD}\")\n  private String password;\n\n  @Bean\n  public GridStore gridStore() throws GSException {\n    \/\/ Acquiring a GridStore instance\n    Properties properties = new Properties();\n    properties.setProperty(\"notificationMember\", notificationMember);\n    properties.setProperty(\"clusterName\", clusterName);\n    properties.setProperty(\"user\", user);\n    properties.setProperty(\"password\", password);\n    return GridStoreFactory.getInstance().getGridStore(properties);\n  }\n}<\/code><\/pre>\n<\/div>\n<h2>Metric Collection<\/h2>\n<p>Having established the groundwork with GridDB and Spring Boot integration, we can now delve into the crucial aspects of data collection and schema design. These steps define the structure and organization of the performance metrics we intend to monitor.<\/p>\n<p><strong>Leveraging Spring Actuator for Seamless Metric Collection<\/strong><\/p>\n<p>Spring Boot Actuator is a powerful tool that simplifies application monitoring by exposing various endpoints. These endpoints provide valuable insights into the application&#8217;s health, performance, and configuration. In our scenario, Spring Actuator acts as the primary source for collecting key performance metrics. By integrating with Spring Actuator&#8217;s relevant endpoints, your Spring Boot application can gather crucial data points such as:<\/p>\n<ul>\n<li>Memory usage (heap, non-heap)<\/li>\n<li>Garbage collection activity<\/li>\n<li>CPU utilization<\/li>\n<li>Thread pool statistics<\/li>\n<li>HTTP request latencies and error rates<\/li>\n<\/ul>\n<p>This example demonstrates how to access CPU utilization metrics in your Spring Boot application<\/p>\n<p>Spring Boot Actuator exposes various endpoints for monitoring and managing your application. One such endpoint, <code>\/actuator\/metrics\/system.cpu.usage<\/code>, provides data about the CPU usage of the system where your application is running. This endpoint typically returns a JSON response containing the CPU usage as a percentage value.<\/p>\n<p>To access all actuator endpoints, including the CPU usage endpoint, you might need to adjust your Spring Boot configuration. By adding the following property to your <code>application.properties<\/code> file, you expose all actuator endpoints:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">management.endpoints.web.exposure.include=*<\/code><\/pre>\n<\/div>\n<p>Once the configuration is set up, you can access the CPU usage endpoint using a tool like Postman or by directly sending an HTTP GET request to the following URL:<\/p>\n<pre><code>http:\/\/localhost:&lt;port&gt;\/actuator\/metrics\/system.cpu.usage\n<\/code><\/pre>\n<p>Replace <code>&lt;port&gt;<\/code> with the actual port number on which your Spring Boot application is running. This endpoint typically returns a JSON response containing details about CPU usage.<\/p>\n<p>The exact format of the response might vary depending on your Spring Boot version and configuration. However, it usually includes the CPU usage as a percentage value.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">{\n  \"name\": \"system.cpu.usage\",\n  \"measurements\": [\n    {\n      \"statistic\": \"VALUE\",\n      \"value\": 0.25\n    }\n  ],\n  \"availableTags\": []\n}<\/code><\/pre>\n<\/div>\n<p><strong>Implementation of Scheduled Tasks<\/strong><\/p>\n<p>To monitoring at predefined intervals, we need to utilize the spring schedular approach. These tasks collect performance metrics from various sources, such as application logs, system metrics, and external APIs, and store them in GridDB for analysis.<\/p>\n<p>Spring Boot provides a built-in scheduling mechanism that allows you to automate tasks at predefined intervals. In this context, we&#8217;ll leverage scheduled tasks to collect and store performance metrics in GridDB for further analysis.<\/p>\n<p><strong>Task Functionality:<\/strong><\/p>\n<p>The scheduled tasks will be responsible for:<\/p>\n<ul>\n<li><strong>Collecting Performance Metrics:<\/strong> These metrics can be retrieved from various sources, including application logs, system metrics (like CPU usage), and external APIs.<\/li>\n<li><strong>Storing Data in GridDB:<\/strong> The collected metrics will be processed and stored in GridDB for efficient analysis.<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package mycode.service;\n\nimport java.util.Date;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.http.HttpStatus;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.scheduling.annotation.Scheduled;\nimport org.springframework.stereotype.Service;\nimport org.springframework.web.client.HttpClientErrorException;\nimport org.springframework.web.client.RestTemplate;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.toshiba.mwcloud.gs.*;\n\nimport mycode.dto.CpuMetric;\n\n@Service\npublic class MetricsCollectionService {\n  @Autowired\n  GridStore store;\n\n  @Scheduled(fixedRate = 6000) \/\/ Collect metrics every minute\n  public void collectMetrics() throws GSException {\n    \/\/ Fetch CPU usage metrics from Spring Boot Actuator endpoint\n    double cpuUsage = getCPUUsageFromActuator();\n    Date timestamp = new Date();\n\n    \/\/ Create a CPU metric object\n    CpuMetric cpuMetric = new CpuMetric(timestamp, cpuUsage);\n\n    \/\/ Store the metric in GridDB\n    System.out.println(\"Fetching CPU metrics at current time\");\n    TimeSeries&lt;cpumetric> ts = store.putTimeSeries(\"cpuMetrics\", CpuMetric.class);\n    ts.append(cpuMetric);\n  }\n\n  private double getCPUUsageFromActuator() {\n    String actuatorUrl = \"http:\/\/localhost:8080\/actuator\/metrics\/system.cpu.usage\";\n    RestTemplate restTemplate = new RestTemplate();\n    try {\n      ResponseEntity&lt;string> responseEntity = restTemplate.getForEntity(actuatorUrl, String.class);\n\n      if (responseEntity.getStatusCode() == HttpStatus.OK) {\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(responseEntity.getBody());\n        JsonNode measurements = root.path(\"measurements\");\n\n        if (measurements.isArray() && measurements.size() > 0) {\n          JsonNode valueNode = measurements.get(0).path(\"value\");\n          if (valueNode.isDouble())\n            return valueNode.asDouble();\n        }\n      }\n    } catch (HttpClientErrorException e) {\n      \/\/ Handle HTTP client errors\n      System.err.println(\"HTTP error: \" + e.getMessage());\n    } catch (Exception e) {\n      \/\/ Handle other exceptions\n      System.err.println(\"Error: \" + e.getMessage());\n    }\n\n    \/\/ Return a default value if unable to fetch or parse the CPU usage\n    return -1.0;\n  }\n}&lt;\/string>&lt;\/cpumetric><\/code><\/pre>\n<\/div>\n<p>Storing Processed Data in GridDB: To store performance metrics efficiently, we&#8217;ll define a dedicated schema within GridDB.<\/p>\n<p>Here&#8217;s an example of a schema class named <code>CpuMetric<\/code> that represents CPU usage data:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package mycode.dto;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\nimport java.util.Date;\n\nimport com.toshiba.mwcloud.gs.RowKey;\n\n@Data\n@NoArgsConstructor\n@AllArgsConstructor\npublic class CpuMetric {\n  @RowKey\n  public Date timestamp;\n  public double cpuUsage;\n}<\/code><\/pre>\n<\/div>\n<h2> <\/h2>\n<p><strong>Dynamic CPU Usage Threshold with GridDB<\/strong><\/p>\n<p>Traditional CPU monitoring often relies on static thresholds, risking false positives or missing critical situations. This section explores a dynamic approach for setting CPU usage thresholds based on historical data stored in GridDB.<\/p>\n<p>In this approach, we&#8217;ll utilize a dynamic threshold methodology to calculate CPU usage based on historical data. We&#8217;ll start by fetching historical CPU metrics from GridDB, covering a defined timeframe. Next, we&#8217;ll process this data, calculating aggregate metrics such as total CPU usage and the count of data points. This allows us to compute the average CPU usage over the specified period. Finally, leveraging historical trends and deviations, we&#8217;ll determine a dynamic threshold tailored to the current system state. This approach ensures adaptability to system fluctuations and facilitates proactive monitoring and alerting for anomalous CPU behavior.<\/p>\n<p>The **calculateDynamicThreshold ** method serves a critical role in monitoring system health by analyzing historical CPU metrics stored in GridDB and dynamically determining a suitable threshold for CPU usage.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package mycode.service;\n\nimport java.io.IOException;\nimport java.text.SimpleDateFormat;\nimport java.time.Instant;\nimport java.util.Date;\nimport java.util.List;\nimport java.util.concurrent.TimeUnit;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.scheduling.annotation.Scheduled;\nimport org.springframework.stereotype.Service;\n\nimport com.toshiba.mwcloud.gs.Container;\nimport com.toshiba.mwcloud.gs.GridStore;\nimport com.toshiba.mwcloud.gs.Query;\nimport com.toshiba.mwcloud.gs.Row;\nimport com.toshiba.mwcloud.gs.RowSet;\n\nimport mycode.dto.CpuMetric;\n\n@Service\npublic class AlertingService {\n\n  private final double cpuUsageThreshold = 90.0; \/\/ CPU usage threshold in percentage\n  @Autowired\n  GridStore store;\n\n  @Scheduled(fixedRate = 60000) \/\/ Check metrics every minute\n  public void monitorAndAlert() throws Exception {\n    \/\/ Fetch the latest CPU metric from GridDB\n\n    double currentThreshold = c sendAlertOException ex) {\n      ex.printStackTrace();\n    }\n  }\n\n  private double calculateDynamicThreshold() throws Exception {\n\n    Container<?, Row> container = store.getContainer(\"cpuMetrics\");\n    if (container == null) {\n      throw new Exception(\"Container not found.\");\n    }\n\n    SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n    Date now = new Date();\n    Date sixHoursAgo = new Date(now.getTime() - TimeUnit.HOURS.toMillis(6));\n\n    String nowString = dateFormat.format(now);\n    String sixHoursAgoString = dateFormat.format(sixHoursAgo);\n\n    String queryString = \"select * where timestamp >= TIMESTAMP('\" + sixHoursAgoString\n        + \"') and timestamp &lt;= TIMESTAMP('\" + nowString + \"')\";\n    System.out.println(queryString);\n    Query&lt;row> query = container.query(queryString);\n    \/\/ Fetch the results using RowSet\n    RowSet&lt;\/row>&lt;row> rs = query.fetch();\n\n    \/\/ Process the fetched CPU metrics\n    double totalCpuUsage = 0.0;\n    int count = 0;\n    while (rs.hasNext()) {\n      Row row = rs.next();\n      Double cpuUsage = row.getDouble(1);\n      totalCpuUsage += cpuUsage;\n      count++;\n      System.out\n          .println(\"Timestamp: \" + row.getTimestamp(0) + \", CPU Usage: \" + row.getDouble(1));\n    }\n\n    \/\/ Calculate the average CPU usage over the past six hours\n    double averageCpuUsage = (count > 0) ? (totalCpuUsage \/ count) : 0.0;\n\n    \/\/ Perform additional calculations based on averageCpuUsage and return the\n    \/\/ result\n    double dynamicThreshold = calculateThreshold(averageCpuUsage);\n\n    return dynamicThreshold;\n  }\n\n  private double calculateThreshold(double averageCpuUsage) {\n    return averageCpuUsage * 1.2;\n  }\n\n}&lt;\/row><\/code><\/pre>\n<\/div>\n<p>When a metric violation is detected by the continuous monitoring module, our Spring Boot application needs to generate an alert object encapsulating relevant information. This object typically includes details such as:<\/p>\n<ul>\n<li><strong>Metric Name:<\/strong> The specific metric that breached the threshold.<\/li>\n<li><strong>Threshold Violated:<\/strong> The particular threshold that was exceeded.<\/li>\n<li><strong>Current Value:<\/strong> The actual value of the metric at the time of violation.<\/li>\n<li><strong>Timestamp:<\/strong> The exact time the violation occurred.<\/li>\n<\/ul>\n<p>To use a third-party API like SendGrid to send emails in your <code>sendAlert()<\/code> method, you&#8217;ll first need to integrate the SendGrid Java library into your project. Then you can use the SendGrid API to send emails.The <code>sendAlert<\/code> method can leverage a third-party API like SendGrid to deliver email notifications. To achieve this, you&#8217;ll need to integrate the SendGrid Java library into your project. Here&#8217;s how you can do it:<\/p>\n<ul>\n<li>Add the SendGrid dependency to your <code>pom.xml<\/code>:<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">  &lt;dependency&gt;\n      &lt;groupId&gt;com.sendgrid&lt;\/groupId&gt;\n      &lt;artifactId&gt;sendgrid-java&lt;\/artifactId&gt;\n      &lt;version&gt;4.8.0&lt;\/version&gt;\n  &lt;\/dependency&gt;<\/code><\/pre>\n<\/div>\n<ul>\n<li>Configure your SendGrid API key and other properties in <code>application.properties<\/code>:<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">sendgrid.api.key=YOUR_SENDGRID_API_KEY<\/code><\/pre>\n<\/div>\n<ul>\n<li>Implement the <code>sendAlert()<\/code> method using SendGrid:<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">  public void sendAlert(double cpuUsage) {\n    Email from = new Email(\"your@example.com\");\n    String subject = \"CPU Alert - High CPU Usage Detected\";\n    Email to = new Email(\"admin@example.com\");\n    Content content = new Content(\"text\/plain\",\n        \"CPU usage has exceeded the threshold.\" + cpuUsage + \"at\" + Instant.now());\n    Mail mail = new Mail(from, subject, to, content);\n\n    SendGrid sg = new SendGrid(sendGridApiKey);\n    Request request = new Request();\n    try {\n      request.setMethod(Method.POST);\n      request.setEndpoint(\"mail\/send\");\n      request.setBody(mail.build());\n      Response response = sg.api(request);\n      System.out.println(response.getStatusCode());\n      System.out.println(response.getBody());\n      System.out.println(response.getHeaders());\n    } catch (IOException ex) {\n      ex.printStackTrace();\n    }\n  }<\/code><\/pre>\n<\/div>\n<p>with this, it will trigger the email as below:<\/p>\n<p><img decoding=\"async\" src=\"img\/image.png\" alt=\"\" \/><\/p>\n<h3>Running the Project<\/h3>\n<p>To run the project, Execute the following command to build and run your application:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">mvn clean install && mvn spring-boot:run  <\/code><\/pre>\n<\/div>\n<p>Upon successful execution of the command, you should see an output similar to the following in your terminal window:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">[INFO] Attaching agents: []\nSLF4J(W): Class path contains multiple SLF4J providers.\nSLF4J(W): Found provider [ch.qos.logback.classic.spi.LogbackServiceProvider@5fa7e7ff]\nSLF4J(W): Found provider [org.slf4j.jul.JULServiceProvider@4629104a]\nSLF4J(W): See https:\/\/www.slf4j.org\/codes.html#multiple_bindings for an explanation.\nSLF4J(I): Actual provider is of type [ch.qos.logback.classic.spi.LogbackServiceProvider@5fa7e7ff]\n\n  .   ____          _            __ _ _\n \/\\ \/ ___'_ __ _ _(_)_ __  __ _    \n( ( )___ | '_ | '_| | '_ \/ _` |    \n \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n  '  |____| .__|_| |_|_| |___, | \/ \/ \/ \/\n =========|_|==============|___\/=\/_\/_\/_\/\n :: Spring Boot ::             my-griddb-app)\n2024-04-05T16:55:48.101+05:30  INFO 1271 --- [           main] mycode.MySpringBootApplication           : No active profile set, falling back to 1 default profile: \"default\"\n2024-04-05T16:55:50.941+05:30  INFO 1271 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8080 (http)\n2024-04-05T16:55:50.971+05:30  INFO 1271 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]\n2024-04-05T16:55:50.971+05:30  INFO 1271 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat\/10.1.19]\n2024-04-05T16:55:51.092+05:30  INFO 1271 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[\/]       : Initializing Spring embedded WebApplicationContext\n2024-04-05T16:55:51.093+05:30  INFO 1271 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2876 ms\n2024-04-05T16:55:53.025+05:30  INFO 1271 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 13 endpoint(s) beneath base path '\/actuator'\n2024-04-05T16:55:53.143+05:30  INFO 1271 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8080 (http) with context path ''\n2024-04-05T16:55:53.163+05:30  INFO 1271 --- [           main] mycode.MySpringBootApplication           : Started MySpringBootApplication in 6.047 seconds (pr24-04-05T16:55:53.328Z')\n2024-04-05T16:55:53.647+05:30  INFO 1271 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[\/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'\n2024-04-05T16:55:53.648+05:30  INFO 1271 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'\n2024-04-05T16:55:53.649+05:30  INFO 1271 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms\nFetching CPU metrics at current time\nFetching CPU metrics at current time\nFetching CPU metrics at current time\nFetching CPU metrics at current time\nFetching CPU metrics at current time\nTimestamp: Fri Apr 05 16:55:59 IST 2024, CPU Usage: 0.004949328305444261\nTimestamp: Fri Apr 05 16:56:05 IST 2024, CPU Usage: 0.0020863759649488835\nTimestamp: Fri Apr 05 16:56:11 IST 2024, CPU Usage: 0.001875390706397166\nTimestamp: Fri Apr 05 16:56:17 IST 2024, CPU Usage: 0.001665972511453561\nTimestamp: Fri Apr 05 16:56:23 IST 2024, CPU Usage: 0.001669449081803005\nTimestamp: Fri Apr 05 16:56:29 IST 2024, CPU Usage: 6.253908692933083E-4\nTimestamp: Fri Apr 05 16:56:35 IST 2024, CPU Usage: 0.0016677089847821555\nTimestamp: Fri Apr 05 16:56:41 IST 2024, CPU Usage: 0.0010412328196584756\nTimestamp: Fri Apr 05 16:56:47 IST 2024, CPU Usage: 6.264355815410315E-4hing CPU metrics at current time<\/code><\/pre>\n<\/div>\n<p>Once the CPU usage surpasses the dynamically calculated threshold, the <code>sendAlert<\/code> method will be triggered. This method, as mentioned earlier, can leverage a third-party API like SendGrid to send notification emails about the potential CPU overload.<\/p>\n<p><strong>Data Storage in GridDB:<\/strong><\/p>\n<p>While alerts are sent for real-time monitoring, the collected CPU metrics are continuously stored in your internal GridDB instance for historical analysis and future reference. You can access and query this data using the GridDB Shell tool as below.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">$ gs_sh\nLoading \"\/var\/lib\/gridstore\/.gsshrc\"\nSLF4J: Class path contains multiple SLF4J bindings.\nSLF4J: Found binding in [jar:file:\/usr\/share\/java\/griddb-cli.jar!\/org\/slf4j\/impl\/StaticLoggerBinder.class]\nSLF4J: Found binding in [jar:file:\/usr\/gridstore\/lib\/logback-classic-1.0.13.jar!\/org\/slf4j\/impl\/StaticLoggerBinder.class]\nSLF4J: See http:\/\/www.slf4j.org\/codes.html#multiple_bindings for an explanation.\nSLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]\nThe connection attempt was successful(NoSQL).\nThe connection attempt was successful(NewSQL).\ngs[public]> SELECT * FROM cpuMetrics;\n65 results. (14 ms)\ngs[public]> get 65\n+--------------------------+-----------------------+\n| Timestamp                | CpuUsage              |\n+--------------------------+-----------------------+\n| 2024-04-03T18:37:16.331Z | 0.0048760521050437682 |\n| 2024-04-05T11:27:23.156Z | 8.333333333333334E-4  |\n| 2024-04-05T11:27:29.073Z | 8.347245409015025E-4  |\n| 2024-04-05T11:27:35.091Z | 8.340283569641367E-4  |\n| 2024-04-05T11:27:41.107Z | 6.256517205422314E-4  |\n| 2024-04-05T11:27:47.123Z | 0.0010444955086693127 |\n| 2024-04-05T11:27:53.137Z | 8.335069806209627E-4  |\n| 2024-04-05T11:27:59.153Z | 6.255212677231026E-4  |\n| 2024-04-05T11:28:05.070Z | 4.1718815185648727E-4 |\n| 2024-04-05T11:28:11.086Z | 6.256517205422315E-4  |\n| 2024-04-05T11:28:17.097Z | 6.252605252188412E-4  |\n| 2024-04-05T11:28:23.109Z | 0.0012513034410844628 |\n| 2024-04-05T11:28:29.125Z | 0.0025010421008753647 |\n| 2024-04-05T11:28:35.141Z | 0.004586199708150928  |\n| 2024-04-05T11:28:41.154Z | 0.01920267167605928   |\n| 2024-04-05T11:28:47.069Z | 0.0018769551616266945 |\n| 2024-04-05T11:28:53.334Z | 0.0018575851393188856 |\n| 2024-04-05T11:28:59.149Z | 0.0021235931195582925 |\n| 2024-04-05T11:29:05.166Z | 0.0014583333333333334 |\n| 2024-04-05T11:29:11.083Z | 0.0022921441967076474 |\n| 2024-04-05T11:29:17.099Z | 0.002082032063293775  |\n| 2024-04-05T11:29:23.116Z | 8.350730688935282E-4  |\n| 2024-04-05T11:29:29.132Z | 6.256517205422314E-4  |\n| 2024-04-05T11:29:35.148Z | 8.338544923910778E-4  |\n| 2024-04-05T11:29:41.162Z | 0.001043187982474442  |\n| 2024-04-05T11:29:47.077Z | 0.0014601585314977055 |\n| 2024-04-05T11:29:53.093Z | 0.004372267332916927  |\n| 2024-04-05T11:29:59.111Z | 0.0010438413361169101 |\n| 2024-04-05T11:30:05.125Z | 0.0012505210504376823 |\n| 2024-04-05T11:30:11.142Z | 0.0010423181154888472 |\n| 2024-04-05T11:30:17.155Z | 0.01943979933110368   |\n| 2024-04-05T11:30:23.070Z | 0.0014595496246872393 |\n| 2024-04-05T11:30:29.086Z | 8.340283569641367E-4  |\n| 2024-04-05T11:30:35.231Z | 0.002073828287017835  |\n+--------------------------+-----------------------+\nThe 65 results had been acquired.<\/code><\/pre>\n<\/div>\n<h3><strong>Conclusion:<\/strong><\/h3>\n<p>In summary, the integration of GridDB with Spring Boot offers a potent solution for real-time monitoring and alerting in modern applications. By leveraging GridDB&#8217;s high-performance Java Client API, developers can efficiently store and query key performance metrics. Coupled with Spring Boot&#8217;s robust framework, this integration facilitates the implementation of continuous monitoring and the development of responsive notification systems.<\/p>\n<p>Through efficient schema design and dynamic configuration, developers can tailor monitoring solutions to their specific needs, ensuring timely detection and resolution of anomalies. With the ability to integrate email, SMS, or Slack notification services, stakeholders can stay informed and respond promptly to critical events.<\/p>\n<p>In essence, GridDB and Spring Boot enable developers to build agile and reliable monitoring systems, enhancing application reliability, performance, and user satisfaction in today&#8217;s fast-paced digital landscape.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In today&#8217;s fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection and resolution of performance issues are critical to prevent downtime, maintain user satisfaction, and optimize resource utilization. Traditional monitoring methods, often relying on intermittent checks and fragmented data sources, struggle to keep pace [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":30149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Real-time Infrastructure Monitoring Using GridDB and Spring Boot | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Introduction In today&#039;s fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Real-time Infrastructure Monitoring Using GridDB and Spring Boot | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Introduction In today&#039;s fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-17T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:57:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1536\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Real-time Infrastructure Monitoring Using GridDB and Spring Boot\",\"datePublished\":\"2024-06-17T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:57:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\"},\"wordCount\":1766,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\",\"name\":\"Real-time Infrastructure Monitoring Using GridDB and Spring Boot | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg\",\"datePublished\":\"2024-06-17T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:57:02+00:00\",\"description\":\"Introduction In today's fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg\",\"width\":1536,\"height\":1536},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.griddb.net\/en\/#website\",\"url\":\"https:\/\/www.griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/www.griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/www.griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/www.griddb.net\/en\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Real-time Infrastructure Monitoring Using GridDB and Spring Boot | GridDB: Open Source Time Series Database for IoT","description":"Introduction In today's fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection","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:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/","og_locale":"en_US","og_type":"article","og_title":"Real-time Infrastructure Monitoring Using GridDB and Spring Boot | GridDB: Open Source Time Series Database for IoT","og_description":"Introduction In today's fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection","og_url":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2024-06-17T07:00:00+00:00","article_modified_time":"2025-11-13T20:57:02+00:00","og_image":[{"width":1536,"height":1536,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"griddb-admin","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/"},"author":{"name":"griddb-admin","@id":"https:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Real-time Infrastructure Monitoring Using GridDB and Spring Boot","datePublished":"2024-06-17T07:00:00+00:00","dateModified":"2025-11-13T20:57:02+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/"},"wordCount":1766,"commentCount":0,"publisher":{"@id":"https:\/\/www.griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/","url":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/","name":"Real-time Infrastructure Monitoring Using GridDB and Spring Boot | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg","datePublished":"2024-06-17T07:00:00+00:00","dateModified":"2025-11-13T20:57:02+00:00","description":"Introduction In today's fast and data-driven world, the seamless operation of our applications and systems stands as a critical priority. Early detection","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/monitor-spring-boot\/#primaryimage","url":"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg","contentUrl":"\/wp-content\/uploads\/2024\/06\/Gemini_Generated_Image_pvazzapvazzapvaz.jpg","width":1536,"height":1536},{"@type":"WebSite","@id":"https:\/\/www.griddb.net\/en\/#website","url":"https:\/\/www.griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/www.griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/www.griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/www.griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/www.griddb.net\/en\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46804"}],"version-history":[{"count":1,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46804\/revisions"}],"predecessor-version":[{"id":51466,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46804\/revisions\/51466"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/30149"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}