Index: /branches/amp_4_0/platform/config/syslog/syslog.conf
===================================================================
--- /branches/amp_4_0/platform/config/syslog/syslog.conf	(nonexistent)
+++ /branches/amp_4_0/platform/config/syslog/syslog.conf	(working copy)
@@ -0,0 +1,496 @@
+input {
+  udp {
+    port => 5514
+    type => "syslog"
+    codec => plain {
+      charset => "UTF-8"
+    }
+  }
+  tcp {
+    port => 5514
+    type => "syslog"
+    codec => plain {
+      charset => "UTF-8"
+    }
+  }
+}
+
+filter {
+  # Stage 1: Initial Cleaning
+  if [message] {
+    # Remove null characters (NUL) which are common in syslog (represented as \x00 or \u0000)
+    ruby {
+      code => '
+        if event.get("message").is_a?(String)
+          event.set("message", event.get("message").gsub(/\\x00/, ""))
+        elsif event.get("message").is_a?(Array)
+          cleaned = event.get("message").map { |m| m.gsub(/\\x00/, "") if m }
+          event.set("message", cleaned.join(" "))
+        end
+      '
+    }
+  }
+
+  if [type] == "syslog" {
+    # Stage 2: Parsing Attempts (Cascading Grok)
+
+    # Attempt 1: RFC 5424 (Standard Syslog Header)
+    grok {
+      match => {
+        "message" => "^<%{NUMBER:syslog_pri}>%{NUMBER:syslog_protocol_version} %{TIMESTAMP_ISO8601:syslog_timestamp} %{HOSTNAME:syslog_hostname} %{DATA:syslog_appname} %{DATA:syslog_procid} %{DATA:syslog_msgid} (?<syslog_structured_data>-|\\[.*?\\])(?:\\s+)?%{GREEDYDATA:syslog_message}"
+      }
+      tag_on_failure => ["_grokparsefailure_rfc5424"]
+      add_tag => ["rfc5424_attempt"]
+    }
+
+    # FIX 1: Clean the syslog_message field before further parsing
+    if [syslog_message] {
+      mutate {
+        strip => ["syslog_message"]
+      }
+    }
+
+    # FIX 2: Parse HTTP Security OR Access Message (Key-Value)
+    if !("_grokparsefailure_rfc5424" in [tags]) and ([syslog_message] =~ /^HTTP security:/ or [syslog_message] =~ /^HTTP access:/) {
+
+      # 1. Strip the prefix and sanitize the message
+      mutate {
+        # Removes either prefix
+        gsub => [
+          "syslog_message", "^HTTP security:", "",
+          "syslog_message", "^HTTP access:", "",
+          "syslog_message", "\\\"", ""
+        ]
+        strip => ["syslog_message"]
+      }
+
+      # 2. Use KV filter to extract all security details
+      kv {
+        source => "syslog_message"
+        field_split => " "
+        value_split => "="
+        target => "security_details"
+        add_tag => ["security_kv_parsed"]
+      }
+
+      # 3. Move and enrich key fields from the 'security_details' sub-field
+      if "security_kv_parsed" in [tags] {
+        mutate {
+          # Rename core fields
+          rename => { "[security_details][time]" => "event_time" }
+          rename => { "[security_details][severity]" => "security_severity" }
+          rename => { "[security_details][sip]" => "source_ip" }
+          rename => { "[security_details][sport]" => "source_port" }
+          rename => { "[security_details][dip]" => "destination_ip" }
+          rename => { "[security_details][dport]" => "destination_port" }
+          rename => { "[security_details][atkType]" => "attack_type" }
+          rename => { "[security_details][description]" => "attack_description" }
+          rename => { "[security_details][atkData]" => "attack_data_raw" }
+
+          # **NEW FIELDS: HTTP/Session Details**
+          rename => { "[security_details][reqMethod]" => "http_request_method" }
+          rename => { "[security_details][statusCode]" => "http_status_code" }
+          rename => { "[security_details][protocol]" => "network_protocol" }
+          rename => { "[security_details][reqURL]" => "http_request_url" }
+          rename => { "[security_details][sessionID]" => "session_id" }
+          rename => { "[security_details][usr]" => "user_name" }
+          rename => { "[security_details][srv]" => "server_name" }
+          rename => { "[security_details][host]" => "requested_host" }
+
+          # Convert numerical fields to integers
+          convert => {
+            "source_port" => "integer"
+            "destination_port" => "integer"
+            "http_status_code" => "integer"
+          }
+        }
+
+        # 4. Further parse the complex 'atkData' field
+        if [attack_data_raw] {
+          grok {
+            match => {
+              "attack_data_raw" => "Matched Data: %{DATA:matched_data} found within REQUEST_FILENAME: %{GREEDYDATA:request_filename}"
+            }
+            tag_on_failure => ["_grokparsefailure_attack_data"]
+          }
+        }
+
+        # 5. Parse the embedded event time
+        date {
+          match => ["event_time", "YYYY-MM-dd HH:mm:ss"]
+          target => "event_time"
+          add_tag => ["_security_event_time_parsed"]
+        }
+
+        # 6. Clean up temporary fields and add final tag
+        mutate {
+          remove_field => ["security_details"]
+          remove_field => ["attack_data_raw"]
+          remove_tag => ["_grokparsefailure_an_welf_log_rfc5424"]
+          add_tag => ["an_http_log_parsed"]
+        }
+      }
+    }
+
+    # *** CORRECTED BLOCK START ***
+    # FIX 3: Parse APP-HTTP Access Log (from the vAPV device)
+    #
+    # THIS IS THE FIX: Changed 'elsif' to 'if'
+    #
+    if !("_grokparsefailure_rfc5424" in [tags]) and [syslog_message] =~ /^APP-HTTP/ {
+      grok {
+        match => {
+          # This pattern matches the specific format of your APP-HTTP log
+          "syslog_message" => "^APP-HTTP %{IP:client_ip} %{WORD:http_request_method} %{URI:http_request_url} %{NUMBER:http_status_code:int} %{NUMBER:bytes_sent:int} %{NUMBER:bytes_received:int} %{NUMBER:http_version} %{IPORHOST:destination_ip} %{QUOTEDSTRING:user_agent} %{QUOTEDSTRING:http_referrer} %{WORD:cache_status} %{IPORHOST:next_hop_ip} %{WORD:virtual_server} %{NUMBER:duration_seconds:float} %{INT:unknown_field1} %{INT:unknown_field2} %{INT:unknown_field3}$"
+        }
+        add_tag => ["app_http_log_parsed"]
+        tag_on_failure => ["_grokparsefailure_app_http"]
+      }
+
+      if "app_http_log_parsed" in [tags] {
+        # Clean up the double quotes from the QUOTEDSTRING pattern
+        mutate {
+          gsub => [
+            "user_agent", "\"", "",
+            "http_referrer", "\"", ""
+          ]
+        }
+        # Remove the now-redundant syslog_message and unneeded fields
+        mutate {
+          remove_field => ["syslog_message", "unknown_field1", "unknown_field2", "unknown_field3"]
+        }
+      }
+    }
+    # *** CORRECTED BLOCK END ***
+
+
+    # --- REMAINING FALLBACK GROK ATTEMPTS (UNCHANGED) ---
+    # Attempt 2: AN_WELF_LOG (WITH SYSLOG HEADER)
+    if "_grokparsefailure_rfc5424" in [tags] {
+      grok {
+        match => {
+          "message" => "^<%{POSINT:syslog_pri}>%{POSINT:syslog_version} %{TIMESTAMP_ISO8601:syslog_timestamp} %{HOSTNAME:syslog_hostname} %{DATA:syslog_appname} %{DATA:syslog_procid} %{INT:event_id} - AN_WELF_LOG:id=%{WORD:log_id} time=\"%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{HOUR:hour}:%{MINUTE:minute}:%{SECOND:second}\" fw=%{IP:virtual_ip} pri=%{POSINT:priority} proto=%{WORD:protocol} src=%{IP:src_ip} dstname=%{IP:destination_name} arg=%{URIPATH:arg} op=%{WORD:operation} agent=\"%{DATA:user_agent}\" result=%{INT:http_result_code} sent=%{INT:bytes_sent} duration=%{NUMBER:duration_seconds} msg=\"%{GREEDYDATA:destination_data_raw}\""
+        }
+        tag_on_failure => ["_grokparsefailure_an_welf_log"]
+        add_tag => ["an_welf_log_attempt"]
+      }
+      if !("_grokparsefailure_an_welf_log" in [tags]) {
+        mutate {
+          add_field => { "log_time" => "%{year}-%{month}-%{day} %{hour}:%{minute}:%{second}" }
+          remove_field => ["year", "month", "day", "hour", "minute", "second"]
+        }
+        mutate {
+          gsub => ["destination_data_raw", "\\s+", " "]
+        }
+      }
+    }
+
+    # Attempt 3: AN_WELF_LOG (without SYSLOG HEADER)
+    if "_grokparsefailure_rfc5424" in [tags] and "_grokparsefailure_an_welf_log" in [tags] {
+      grok {
+        match => {
+          "message" => "^AN_WELF_LOG:id=%{WORD:log_id} time=\"%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{HOUR:hour}:%{MINUTE:minute}:%{SECOND:second}\" fw=%{IP:virtual_ip} pri=%{POSINT:priority} proto=%{WORD:protocol} src=%{IP:src_ip} dstname=%{IP:destination_name} arg=%{URIPATH:arg} op=%{WORD:operation} agent=\"%{DATA:user_agent}\" result=%{INT:http_result_code} sent=%{INT:bytes_sent} duration=%{NUMBER:duration_seconds} msg=\"%{GREEDYDATA:message_detail_raw}\""
+        }
+        tag_on_failure => ["_grokparsefailure_an_welf_log_no_header"]
+        add_tag => ["an_welf_log_no_header_attempt"]
+      }
+      if !("_grokparsefailure_an_welf_log_no_header" in [tags]) {
+        mutate {
+          add_field => { "log_time" => "%{year}-%{month}-%{day} %{hour}:%{minute}:%{second}" }
+          remove_field => ["year", "month", "day", "hour", "minute", "second"]
+        }
+        mutate {
+          gsub => ["message_detail_raw", "\\s+", " "]
+        }
+        mutate {
+          add_field => { "syslog_priority" => "%{priority}" }
+          add_field => { "syslog_timestamp" => "%{log_time}" }
+        }
+      }
+    }
+
+    # Attempt 4: Custom/Non-Standard
+    if "_grokparsefailure_rfc5424" in [tags] and "_grokparsefailure_an_welf_log" in [tags] and "_grokparsefailure_an_welf_log_no_header" in [tags] {
+      grok {
+        match => {
+          "message" => "^<%{POSINT:syslog_pri}>%{MONTH:syslog_month} +%{MONTHDAY:syslog_day} %{YEAR:syslog_year} %{TIME:syslog_time} %{IPORHOST:syslog_hostname} %{GREEDYDATA:syslog_content_kv}"
+        }
+        tag_on_failure => ["_grokparsefailure_custom_nonstandard"]
+        add_tag => ["custom_nonstandard_attempt"]
+      }
+      if !("_grokparsefailure_custom_nonstandard" in [tags]) {
+        date {
+          match => ["syslog_month syslog_day syslog_year syslog_time", "MMM ddYYYY HH:mm:ss"]
+          target => "syslog_timestamp"
+          add_tag => ["_dateparseok"]
+          tag_on_failure => ["_dateparsefailure"]
+        }
+        kv {
+          source => "syslog_content_kv"
+          field_split => " "
+          value_split => "="
+          target => "syslog_kv_data"
+        }
+        mutate {
+          add_field => { "syslog_appname" => "%{[syslog_kv_data][id]}" }
+          add_field => { "syslog_msgid" => "%{[syslog_kv_data][type]}" }
+          add_field => { "syslog_message" => "%{[syslog_kv_data][msg]}" }
+          remove_field => ["syslog_month", "syslog_day", "syslog_year", "syslog_time", "syslog_content_kv"]
+        }
+
+        if [syslog_kv_data][fw] {
+          mutate { add_field => { "virtual_ip" => "%{[syslog_kv_data][fw]}" } }
+        }
+        if [syslog_kv_data][src] {
+          mutate { add_field => { "client_ip" => "%{[syslog_kv_data][src]}" } }
+        }
+        if [syslog_kv_data][dst] {
+          mutate { add_field => { "destination_ip" => "%{[syslog_kv_data][dst]}" } }
+        }
+        if [syslog_kv_data][dport] {
+          mutate {
+            add_field => { "destination_port" => "%{[syslog_kv_data][dport]}" }
+            convert => { "destination_port" => "integer" }
+          }
+        }
+        if [syslog_kv_data][time] {
+          date {
+            match => ["syslog_kv_data.time", "YYYY-M-d HH:mm:ss"]
+            target => "log_message_timestamp"
+            tag_on_failure => ["_kvtimeparsefailure"]
+          }
+        }
+      }
+    }
+
+    # Attempt 5: Traditional BSD Syslog
+    if "_grokparsefailure_rfc5424" in [tags] and "_grokparsefailure_an_welf_log" in [tags] and "_grokparsefailure_an_welf_log_no_header" in [tags] and "_grokparsefailure_custom_nonstandard" in [tags] {
+      grok {
+        match => {
+          "message" => "^<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{IPORHOST:syslog_hostname} %{DATA:syslog_appname}(?:\\[%{POSINT:syslog_procid}\\])?:(?: %{DATA:syslog_msgid})? %{GREEDYDATA:syslog_message}"
+        }
+        tag_on_failure => ["_grokparsefailure_bsd"]
+        add_tag => ["bsd_attempt"]
+      }
+    }
+
+
+    # --- Stage 3: Common Post-Parsing Processing (PATCH APPLIED HERE) ---
+
+    if !("_grokparsefailure_rfc5424" in [tags] and "_grokparsefailure_an_welf_log" in [tags] and "_grokparsefailure_an_welf_log_no_header" in [tags] and "_grokparsefailure_custom_nonstandard" in [tags] and "_grokparsefailure_bsd" in [tags]) {
+      if [host][ip] {
+        mutate {
+          copy => { "[host][ip]" => "device_ip" }
+          add_tag => ["device_ip_fallback"]
+        }
+      }
+
+      if [user_agent] {
+        useragent {
+          source => "user_agent"
+          target => "useragent"
+          remove_field => ["user_agent"]
+        }
+      }
+
+      if [syslog_appname] == "-" { mutate { remove_field => ["syslog_appname"] } }
+      if [syslog_procid] == "-"  { mutate { remove_field => ["syslog_procid"]  } }
+      if [syslog_structured_data] == "-" {
+        mutate { remove_field => ["syslog_structured_data"] }
+      } else if [syslog_structured_data] =~ /^\\[.+\\]$/ {
+
+      }
+
+      mutate {
+        rename => {
+          "syslog_pri" => "syslog_priority"
+          "syslog_hostname" => "device_hostname"
+          "syslog_procid" => "process_id"
+          "syslog_msgid" => "message_id"
+        }
+        rename => { "syslog_protocol_version" => "syslog_version" }
+      }
+
+      ruby {
+        code => "
+          if event.get('syslog_priority')
+            priority = event.get('syslog_priority').to_i
+            level = priority % 8
+            facility = priority / 8
+
+            level_map = {
+              0 => 'Emergency', 1 => 'Alert', 2 => 'Critical', 3 => 'Error',
+              4 => 'Warning', 5 => 'Notice', 6 => 'Informational', 7 => 'Debug'
+            }
+            facility_map = {
+              0 => 'Kernel', 1 => 'User', 2 => 'Mail', 3 => 'System Daemons',
+              4 => 'Security/Authorization', 5 => 'Syslog', 6 => 'LPR Subsystem',
+              7 => 'NNTP Subsystem', 8 => 'UUCP Subsystem', 9 => 'Clock Daemon',
+              10 => 'Security/Authorization', 11 => 'FTP Daemon', 12 => 'NTP Subsystem',
+              13 => 'Log Audit', 14 => 'Log Alert', 15 => 'Clock Daemon',
+              16 => 'Local0', 17 => 'Local1', 18 => 'Local2', 19 => 'Local3',
+              20 => 'Local4', 21 => 'Local5', 22 => 'Local6', 23 => 'Local7'
+            }
+
+            event.set('severity_numeric', level)
+            event.set('severity', level_map[level] || 'Unknown')
+            event.set('log_facility_numeric', facility)
+            event.set('log_facility', facility_map[facility] || 'Unknown')
+          end
+        "
+      }
+
+      # *** CORRECTED PATCH START ***
+      # This patch overwrites the calculated 'severity' (e.g., 'Error')
+      # with the more accurate value from the log message (e.g., 'critical'),
+      # and capitalizes it for consistency.
+      if [security_severity] {
+        ruby {
+          code => "
+            # Get the security_severity value (e.g., 'critical')
+            original_severity = event.get('security_severity')
+
+            # Capitalize it (e.g., 'Critical') and set it as the main 'severity'
+            event.set('severity', original_severity.capitalize)
+          "
+        }
+      }
+      # *** CORRECTED PATCH END ***
+
+      mutate {
+        copy => { "[host][ip]" => "device_ip" }
+        rename => { "src_ip" => "client_ip" }
+        rename => { "source_ip" => "client_ip" }
+        rename => { "destination_name" => "destination_ip" }
+      }
+
+      # GEOIP LOOKUPS
+      if [client_ip] {
+        geoip {
+          source => "client_ip"
+          target => "client_geoip"
+          tag_on_failure => ["_geoip_client_failed"]
+        }
+      }
+      if [client_ip] and ![client_geoip][location] {
+        mutate {
+          add_field => {
+            "[client_geoip][city_name]" => "Unknown"
+            "[client_geoip][country_name]" => "Unresolved"
+            "[client_geoip][location][lat]" => "12.9254143647407"
+            "[client_geoip][location][lon]" => "77.63149239905859"
+          }
+        }
+        mutate {
+          add_tag => ["_geoip_client_unresolved"]
+        }
+      }
+
+      if [destination_ip] {
+        geoip {
+          source => "destination_ip"
+          target => "destination_geoip"
+          tag_on_failure => ["_geoip_destination_failed"]
+        }
+      }
+      if [destination_ip] and ![destination_geoip][location] {
+        mutate {
+          add_field => {
+            "[destination_geoip][city_name]" => "Unknown"
+            "[destination_geoip][country_name]" => "Unresolved"
+            "[destination_geoip][location][lat]" => "0.0"
+            "[destination_geoip][location][lon]" => "0.0"
+          }
+        }
+        mutate {
+          add_tag => ["_geoip_destination_unresolved"]
+        }
+      }
+
+      # JDBC LOOKUP (DEVICE INFO)
+      if [device_ip] {
+        jdbc_streaming {
+          jdbc_driver_library => "/etc/logstash/jdbc_drivers/postgresql-42.7.5.jar"
+          jdbc_driver_class => "org.postgresql.Driver"
+          jdbc_connection_string => "jdbc:postgresql://127.0.0.1:5432/cm"
+          jdbc_user => "amp_admin"
+          jdbc_password => "Array@123$"
+          statement => "SELECT name, type, device_group FROM device WHERE ip_address = :device_ip"
+          parameters => { "device_ip" => "device_ip" }
+          target => "device_info"
+          tag_on_failure => ["_device_lookup_failure"]
+        }
+
+        if [device_info] {
+          ruby {
+            code => "
+              if event.get('device_info') && event.get('device_info')[0]
+                device = event.get('device_info')[0]
+                event.set('device_name', device['name'])
+                event.set('device_type', device['type'])
+                event.set('device_group', device['device_group'])
+              else
+                event.tag('_device_info_not_found')
+              end
+              event.remove('device_info')
+            "
+          }
+        } else {
+          mutate {
+            add_tag => ["_device_info_not_found"]
+          }
+        }
+      }
+
+      # Tag Cleanup based on successful parse
+      if !("_grokparsefailure_rfc5424" in [tags]) {
+        mutate {
+          remove_tag => ["_grokparsefailure_an_welf_log", "_grokparsefailure_an_welf_log_no_header", "_grokparsefailure_custom_nonstandard", "_grokparsefailure_bsd"]
+          add_tag => ["syslog_parsed", "rfc5424"]
+        }
+      } else if !("_grokparsefailure_an_welf_log" in [tags]) {
+        mutate {
+          remove_tag => ["_grokparsefailure_rfc5424", "_grokparsefailure_an_welf_log_no_header", "_grokparsefailure_custom_nonstandard", "_grokparsefailure_bsd"]
+          add_tag => ["syslog_parsed", "an_welf_log_headered"]
+        }
+      } else if !("_grokparsefailure_an_welf_log_no_header" in [tags]) {
+        mutate {
+          remove_tag => ["_grokparsefailure_rfc5424", "_grokparsefailure_an_welf_log", "_grokparsefailure_custom_nonstandard", "_grokparsefailure_bsd"]
+          add_tag => ["syslog_parsed", "an_welf_log_no_header"]
+        }
+      } else if !("_grokparsefailure_custom_nonstandard" in [tags]) {
+        mutate {
+          remove_tag => ["_grokparsefailure_rfc5424", "_grokparsefailure_an_welf_log", "_grokparsefailure_an_welf_log_no_header", "_grokparsefailure_bsd"]
+          add_tag => ["syslog_parsed", "custom_nonstandard_log"]
+        }
+      } else if !("_grokparsefailure_bsd" in [tags]) {
+        mutate {
+          remove_tag => ["_grokparsefailure_rfc5424", "_grokparsefailure_an_welf_log", "_grokparsefailure_an_welf_log_no_header", "_grokparsefailure_custom_nonstandard"]
+          add_tag => ["syslog_parsed", "bsd_syslog"]
+        }
+      }
+
+      # Stage 4: Handle Unparsed Logs
+      if "_grokparsefailure_rfc5424" in [tags] and "_grokparsefailure_an_welf_log" in [tags] and "_grokparsefailure_an_welf_log_no_header" in [tags] and "_grokparsefailure_custom_nonstandard" in [tags] and "_grokparsefailure_bsd" in [tags] {
+        mutate {
+          add_tag => ["_parsefailure_syslog_unhandled"]
+          remove_tag => ["_grokparsefailure_rfc5424", "_grokparsefailure_an_welf_log", "_grokparsefailure_an_welf_log_no_header", "_grokparsefailure_custom_nonstandard", "_grokparsefailure_bsd"]
+        }
+      }
+    }
+  }
+}
+
+output {
+  stdout { codec => rubydebug }
+  opensearch {
+    hosts => ["https://127.0.0.1:9200"]
+    index => "acm-%{+YYYY.MM.dd}"
+    user => "logstash"
+    password => "Array@123"
+    ssl => true
+    ssl_certificate_verification => true
+    cacert => "/etc/logstash/certs/root-ca.pem"
+    manage_template => false
+  }
+}
\ No newline at end of file
Index: /branches/amp_4_0/platform/config/telegraf/telegraf.conf
===================================================================
--- /branches/amp_4_0/platform/config/telegraf/telegraf.conf	(nonexistent)
+++ /branches/amp_4_0/platform/config/telegraf/telegraf.conf	(working copy)
@@ -0,0 +1,178 @@
+[agent]
+  interval = "10s"
+  round_interval = true
+  metric_batch_size = 5000
+  metric_buffer_limit = 50000
+  collection_jitter = "0s"
+  flush_interval = "10s"
+  precision = ""
+  hostname = "AN"
+  #omit_hostname = true
+  debug = true
+  skip_processors_after_aggregators = false
+
+[[outputs.postgresql]]
+  connection = "host=127.0.0.1 port=5432 user=amp_ts_user password=Array@123$ dbname=amp_ts sslmode=disable"
+  schema = "public"
+
+[[inputs.cpu]]
+  percpu = true
+  totalcpu = true
+
+[[inputs.disk]]
+  mount_points = ["/", "/home", "/var"]
+  ignore_fs = ["tmpfs", "devtmpfs", "overlay", "rootfs"]
+
+[[inputs.mem]]
+
+[[inputs.diskio]]
+
+[[inputs.net]]
+  ignore_protocol_stats = true
+
+[[inputs.system]]
+  fieldinclude = ["load1", "load5", "load15", "uptime"]
+
+[[processors.regex]]
+  order = 1
+  [[processors.regex.fields]]
+    key = ".*"
+    pattern = "\\x00"
+    replacement = ""
+
+[[processors.starlark]]
+  order = 2
+  namepass = ["asf_http_service"]
+  source = '''
+def apply(metric):
+    for key, value in metric.fields.items():
+        if type(value) == "string" and "\x00" in value:
+            metric.fields[key] = value.replace("\x00", "")
+    if "httpServiceIndex" not in metric.fields or metric.fields["httpServiceIndex"] == None:
+        metric.fields["httpServiceIndex"] = 0
+    return metric
+'''
+
+[[processors.starlark]]
+  order = 3
+  source = '''
+def apply(metric):
+    # If any field name looks like an invalid PostgreSQL column (contains spaces or upper-case)
+    # or you have tagged it with invalid_field=true
+    to_remove = []
+
+    for k, v in metric.fields.items():
+        if " " in k or k.isupper():
+            to_remove.append(k)
+        if type(v) == "string" and ("ERROR" in v or "invalid" in v.lower()):
+            to_remove.append(k)
+
+    # Remove detected problematic fields
+    for f in to_remove:
+        metric.fields.pop(f)
+
+    # Optional: remove known redundant 'host' tag
+    if "host" in metric.tags:
+        metric.tags.pop("host")
+
+    return metric
+'''
+
+[[processors.starlark]]
+  order = 4
+  source = '''
+def apply(metric):
+    if metric.name == 'asf_ssl_host_statistics' and 'ssl_index' not in metric.fields:
+        return None
+    if metric.name == 'asf_syslog_history' and 'idx' not in metric.fields:
+        return None
+    #if metric.name not in ['ag_virtual_site_stats', 'ag_vpn_stats', 'apv_real_stats']:
+    if metric.name not in ['apv_real_stats']:
+        return metric
+    if 'real_server_id' in metric.tags or 'serverid' in metric.fields:
+        return metric
+    return None
+'''
+
+[[processors.starlark]]
+  order = 5
+  namepass = ["apv_virtual_stats"]
+  source = '''
+def apply(metric):
+    total = 0
+    for key, value in metric.fields.items():
+        if (key.endswith("hits") or key.endswith("_hits")) and (type(value) == "int" or type(value) == "float"):
+            total += value
+    metric.fields["total_hits"] = total
+    return metric
+'''
+
+[[processors.starlark]]
+  order = 6
+  namepass = ["apv_llb_stats"]
+  source = '''
+def apply(metric):
+    if metric.name != "apv_llb_stats":
+        return metric
+
+    # Fields that must remain as strings
+    string_fields = ["link_resp_time", "link_up_time", "link_down_time",
+                     "link_bandwid_in", "link_bandwid_out", "link_thresh",
+                     "link_status", "link_down_event", "link_name",
+                     "link_gateway", "host"]
+
+    # Fields that must be integers
+    int_fields = ["link_index", "link_hits", "link_conn", "link_usage",
+                  "link_down_count"]
+
+    # Convert string fields safely
+    for f in string_fields:
+        if f in metric.fields:
+            if metric.fields[f] == None:
+                metric.fields[f] = ""
+            else:
+                metric.fields[f] = str(metric.fields[f])
+
+    # Convert int fields safely
+    for f in int_fields:
+        if f in metric.fields:
+            val = metric.fields[f]
+            # Convert numeric strings to int, keep actual int, else 0
+            if val == None:
+                metric.fields[f] = 0
+            elif type(val) == int:
+                metric.fields[f] = val
+            elif type(val) == float:
+                metric.fields[f] = int(val)
+            elif type(val) == str:
+                # remove non-digit characters like 'kbps' or 'ms'
+                digits = ""
+                for c in val:
+                    if c in "0123456789.":
+                        digits += c
+                if digits == "":
+                    metric.fields[f] = 0
+                else:
+                    metric.fields[f] = int(float(digits))
+            else:
+                metric.fields[f] = 0
+
+    # Remove host tag if present
+    if "host" in metric.tags:
+        metric.tags.pop("host")
+
+    return metric
+'''
+
+[[processors.starlark]]
+  order = 7
+  # GLOBAL HOST REMOVAL: Removes the default Telegraf 'host' tag/field from ALL metrics
+  # This ensures the default Telegraf host field, which PostgreSQL does not have a column for, is removed universally.
+  source = '''
+def apply(metric):
+    if "host" in metric.fields:
+        metric.fields.pop("host")
+    if "host" in metric.tags:
+        metric.tags.pop("host")
+    return metric
+'''
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/setup.sh
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/setup.sh	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/setup.sh	(working copy)
@@ -1,37 +1,30 @@
 #!/bin/sh
 export DJANGO_SETTINGS_MODULE=djproject.settings
 /ca/bin/webui_agent &
-nohup python3 -W ignore /ca/webui/htdocs/new/src/manage.py runfcgi method=threaded daemonize=false maxchildren=500 host=127.0.0.1 port=3033 $1 &
+nohup python3 -W ignore /ca/webui/htdocs/new/src/manage.py runfcgi method=threaded daemonize=false maxchildren=500 host=127.0.0.1 port=8000 $1 &
 python3 /ca/webui/htdocs/new/src/cm/lib/init_ftp_server.py &
 python3 /ca/webui/htdocs/new/src/cm/lib/init_tftp_server.py &
-/usr/local/bin/composer/composer_node start
 
 # check license_server
 # if license_server is enabled, run license_server.
-if [ -d /ca/webui/htdocs/new/src/client/app/modules/extensions/license_server/ ]; then
-    if [ -x /ca/extensions/license_server/license_server ]; then
-        pid=`ps auxww | awk '/[l]icense_server/{print $2}'`
-        if [[ $pid == '' ]]; then
-            nohup /ca/extensions/license_server/license_server -l /var/crash/license_server.log &
-        fi
-    fi
-fi
+# ToDo: Fix it once the volume license server feature is fully integrated.
+#if [ -d /ca/webui/htdocs/new/src/client/app/modules/extensions/license_server/ ]; then
+#    if [ -x /ca/extensions/license_server/license_server ]; then
+#        pid=`ps auxww | awk '/[l]icense_server/{print $2}'`
+#        if [[ $pid == '' ]]; then
+#            nohup /ca/extensions/license_server/license_server -l /var/crash/license_server.log &
+#        fi
+#    fi
+#fi
 
-# su anesltkx << EOF
-# cd ~/elasticsearch
-# ./bin/elasticsearch -d
-# exit
-# EOF
-# service acm_syslogd start
-# systemctl start kibana
-# systemctl start elasticsearch
 
 # check vpn_license_server
-if [ -d /ca/webui/htdocs/new/src/client/app/modules/extensions/vpn_license_server/ ]; then
-    if [ -x /ca/extensions/vpn_license_server/license_server ]; then
-        pid=`ps auxww | awk '/[v]pn_license_server\/license_server/{print $2}'`
-        if [[ $pid == '' ]]; then
-            nohup /ca/extensions/vpn_license_server/license_server -l /var/crash/vpn_license_server.log &
-        fi
-    fi
-fi
+# ToDo: Fix it once the vpn volume license server feature is fully integrated.
+#if [ -d /ca/webui/htdocs/new/src/client/app/modules/extensions/vpn_license_server/ ]; then
+#    if [ -x /ca/extensions/vpn_license_server/license_server ]; then
+#        pid=`ps auxww | awk '/[v]pn_license_server\/license_server/{print $2}'`
+#        if [[ $pid == '' ]]; then
+#            nohup /ca/extensions/vpn_license_server/license_server -l /var/crash/vpn_license_server.log &
+#        fi
+#    fi
+#fi
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/report-tasks/report-tasks.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/report-tasks/report-tasks.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/report-tasks/report-tasks.ts	(working copy)
@@ -165,27 +165,53 @@
 
   onDeviceChange() {
     this.deviceServices = [];
-    this.getAPVSLBVirtualServices(this.configForm.value.deviceName);
+    let _device: any = this.configForm.value.deviceName;
+    let payload: any = {
+      "serviceType": "virtualService",
+      "device_ip": _device?.ip,
+    }
+    this.getAPVServices(payload);
+    payload = {
+      "serviceType": "realService",
+      "device_ip": _device?.ip,
+    }
+    this.getAPVServices(payload);
+    payload = {
+      "serviceType": "LLB",
+      "device_ip": _device?.ip,
+    }
+    this.getAPVServices(payload);
   }
 
-  getAPVSLBVirtualServices(_device: any) {
-    this._device.getAPVSLBVirtualServices(_device?.id)
+  getAPVServices(payload: any) {
+    this._device.getDeviceServices(payload)
       .pipe(take(1))
       .subscribe({
         next: (result: any) => {
-          let virtual_services = result?.VirtualService.map((service: any) => {
-            return {
-              ...service,
-              label: service.service_name,
-            }
-          });
-          this.deviceServices = [...virtual_services]
-          this.getAPVSLBRealServices(_device);
+          let services = result.services;
+          this.deviceServices = [...services]
         },
         error: (error: any) => {
           this._notification.showError(error.message);
         }
       })
+    // this._device.getAPVSLBVirtualServices(_device?.id)
+    //   .pipe(take(1))
+    //   .subscribe({
+    //     next: (result: any) => {
+    //       let virtual_services = result?.VirtualService.map((service: any) => {
+    //         return {
+    //           ...service,
+    //           label: service.service_name,
+    //         }
+    //       });
+    //       this.deviceServices = [...virtual_services]
+    //       this.getAPVSLBRealServices(_device);
+    //     },
+    //     error: (error: any) => {
+    //       this._notification.showError(error.message);
+    //     }
+    //   })
   }
 
   getAPVSLBRealServices(_device: any) {
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/reports-overview/reports-overview.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/reports-overview/reports-overview.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/reports-overview/reports-overview.ts	(working copy)
@@ -1,6 +1,9 @@
-import { Component } from '@angular/core';
+import {Component, OnInit} from '@angular/core';
 import {SharedModule} from '../../../shared/shared-module';
 import {MatTableDataSource} from '@angular/material/table';
+import {DeviceService} from '../../../services/device-service';
+import {take} from 'rxjs/operators';
+import {NotificationService} from '../../../services/notification';
 
 @Component({
   selector: 'app-reports-overview',
@@ -8,15 +11,40 @@
   templateUrl: './reports-overview.html',
   styleUrl: './reports-overview.scss'
 })
-export class ReportsOverview {
+export class ReportsOverview implements OnInit {
 
   reportsColumns: string[] = ['serial', 'ctime', 'taskName', 'subject', 'status', 'action'];
   reportsDataSource: MatTableDataSource<any> = new MatTableDataSource();
 
   constructor(
-
+    private _device: DeviceService,
+    private _notification: NotificationService,
   ) {
   }
 
+  ngOnInit() {
+    setTimeout(()=>{
+      this.getReports();
+    })
+  }
+
+  reports:any = [];
+  getReports() {
+    this.reports = []
+    this._device.getReports()
+      .pipe(take(1))
+      .subscribe({
+        next: (data: any) => {
+          if (data && data.reports && data.reports.length > 0) {
+            this.reports = data.reports;
+          }
+        },
+        error: error => {
+          console.log(error);
+          this._notification.showError(error.message);
+        }
+      });
+  }
+
   clearReports(): void {}
 }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-device-details/resource-monitoring-device-details.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-device-details/resource-monitoring-device-details.html	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-device-details/resource-monitoring-device-details.html	(working copy)
@@ -8,14 +8,14 @@
     </mat-card-title>
   </mat-card-header>
 </mat-card>
+<div class="button-container time-filter">
+    <a class="a-link a-link-color" (click)="openTimeFilterDialog()">Current Range: {{ currentFrom }}
+        to {{ currentTo }} (Refresh: {{ currentInterval }})</a>
+</div>
 <mat-tab-group mat-stretch-tabs="false" animationDuration="0ms" [selectedIndex]="selectedTabIndex"
                (selectedTabChange)="onTabChange($event)">
   <mat-tab label="Basic Monitoring">
     <ng-template matTabContent>
-      <div class="button-container time-filter">
-        <a class="a-link a-link-color" (click)="openTimeFilterDialog()">Current Range: {{ currentFrom }}
-          to {{ currentTo }} (Refresh: {{ currentInterval }})</a>
-      </div>
       <div class="tab-content">
         <mat-grid-list cols="3" rowHeight="100px">
           <mat-grid-tile colspan="1" rowspan="3">
@@ -24,8 +24,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">CPU Usage (%)</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -40,8 +38,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Memory Usage(%)</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -56,8 +52,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Disk Usage(%)</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -72,8 +66,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Network Throughput</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -88,8 +80,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Open SSL Connections</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -104,8 +94,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Number of connections per second</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -120,8 +108,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Number of requests per second</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -136,8 +122,6 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">SSL Core Utilization(%)</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
@@ -160,12 +144,10 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text"> HTTP Status Code Ratio</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
-
+                    <div echarts [options]="httpStatusRatioChartOptions" class="chart-container"></div>
                 </div>
               </mat-card-content>
             </mat-card>
@@ -176,13 +158,10 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Number Of Virtual Service Visits</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
+                    <div echarts [options]="vSVisitsChartOptions" class="chart-container"></div>
                 </div>
               </mat-card-content>
             </mat-card>
@@ -193,136 +172,105 @@
                 <div class="card-header-row">
                   <mat-card-title class="card-title">
                     <span class="card-title-text">Virtual Service Response Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Client To Device Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Device Processing Request Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Server Response Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Device Processing Response Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">SSL Handshake Success/Failure Ratio</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">SSL Handshake Failure Reason Statistics</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
                   </mat-card-title>
                 </div>
                 <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
+                    <div echarts [options]="vSRespTimeChartOptions" class="chart-container"></div>
                 </div>
               </mat-card-content>
             </mat-card>
           </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">SSL Handshake Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--          <div echarts [options]="chartOption1" class="chart-container"></div>-->
-                  <!--          <div echarts [options]="chartOption2" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">Client To Device Time</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">Device Processing Request Time</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">Server Response Time</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">Device Processing Response Time</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">SSL Handshake Success/Failure Ratio</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">SSL Handshake Failure Reason Statistics</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
+<!--          <mat-grid-tile colspan="1" rowspan="3">-->
+<!--            <mat-card class="dashboard-card" appearance="outlined">-->
+<!--              <mat-card-content class="card-content-wrapper">-->
+<!--                <div class="card-header-row">-->
+<!--                  <mat-card-title class="card-title">-->
+<!--                    <span class="card-title-text">SSL Handshake Time</span>-->
+<!--                  </mat-card-title>-->
+<!--                </div>-->
+<!--                <div class="chart-flex-container">-->
+<!--                </div>-->
+<!--              </mat-card-content>-->
+<!--            </mat-card>-->
+<!--          </mat-grid-tile>-->
         </mat-grid-list>
       </div>
     </ng-template>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-device-details/resource-monitoring-device-details.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-device-details/resource-monitoring-device-details.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-device-details/resource-monitoring-device-details.ts	(working copy)
@@ -2,211 +2,420 @@
 import {ActivatedRoute, Router} from '@angular/router';
 import {SharedModule} from '../../../shared/shared-module';
 import {DeviceService} from '../../../services/device-service';
-import {startWith, take, tap} from 'rxjs/operators';
+import {take} from 'rxjs/operators';
 import {EChartsOption} from 'echarts';
 import {ChartOptions} from '../../../services/chart-options';
 import {MatDialog} from '@angular/material/dialog';
 import {TimeFilter, TimeRange} from '../../common/time-filter/time-filter';
-import {interval} from 'rxjs';
-import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
+import {OpenSearch} from "../../../services/open-search";
+import {UtilsService} from "../../../services/utils-service";
 
 @Component({
-  selector: 'app-resource-monitoring-device-details',
-  imports: [
-    SharedModule,
-  ],
-  templateUrl: './resource-monitoring-device-details.html',
-  styleUrl: './resource-monitoring-device-details.scss'
+    selector: 'app-resource-monitoring-device-details',
+    imports: [
+        SharedModule,
+    ],
+    templateUrl: './resource-monitoring-device-details.html',
+    styleUrl: './resource-monitoring-device-details.scss'
 })
 export class ResourceMonitoringDeviceDetails implements OnInit {
 
-  deviceName: any = '';
-  deviceIp: any = '';
+    deviceName: any = '';
+    deviceIp: any = '';
 
-  selectedTabIndex: number = 0;
-  private tabNames: string[] = [
-    'Basic Monitoring',
-    'Audit Monitoring',
-  ];
+    selectedTabIndex: number = 0;
+    private tabNames: string[] = [
+        'Basic Monitoring',
+        'Audit Monitoring',
+    ];
 
-  cpuChartOptions: EChartsOption = {};
-  memoryChartOptions: EChartsOption = {};
-  diskUsageChartOptions: EChartsOption = {};
-  throughputChartOptions: EChartsOption = {};
-  sslConnectionsChartOptions: EChartsOption = {};
-  connectionsChartOptions: EChartsOption = {};
-  requestsChartOptions: EChartsOption = {};
-  sslCoreChartOptions: EChartsOption = {};
+    cpuChartOptions: EChartsOption = {};
+    memoryChartOptions: EChartsOption = {};
+    diskUsageChartOptions: EChartsOption = {};
+    throughputChartOptions: EChartsOption = {};
+    sslConnectionsChartOptions: EChartsOption = {};
+    connectionsChartOptions: EChartsOption = {};
+    requestsChartOptions: EChartsOption = {};
+    sslCoreChartOptions: EChartsOption = {};
 
-  currentFrom: string | Date = 'now-15m';
-  currentTo: string | Date = 'now';
-  currentInterval: number = 10;
-  private destroyRef = inject(DestroyRef);
+    // Audit Monitoring
+    httpStatusRatioChartOptions: EChartsOption = {};
+    vSVisitsChartOptions: EChartsOption = {};
+    vSRespTimeChartOptions: EChartsOption = {};
 
-  constructor(
-    private _route: ActivatedRoute,
-    private _router: Router,
-    private _device: DeviceService,
-    private _chartOptions: ChartOptions,
-    private _dialog: MatDialog,
-  ) {
-  }
+    currentFrom: string | Date = 'now-15m';
+    currentTo: string | Date = 'now';
+    currentInterval: number = 10;
+    private destroyRef = inject(DestroyRef);
 
-  ngOnInit() {
-    this.deviceName = this._route.snapshot.paramMap.get('deviceName');
-    this.deviceIp = this._route.snapshot.paramMap.get('deviceIp');
-    // setTimeout(()=>{
-    //   interval(this.currentInterval * 1000)
-    //     .pipe(
-    //       startWith(0),
-    //       tap(() => this.getBasicMonitoringMetrics()),
-    //       takeUntilDestroyed(this.destroyRef)
-    //     )
-    //     .subscribe();
-    // })
-    // ToDo: Enable auto-refresh
-    this.getBasicMonitoringMetrics();
-  }
+    constructor(
+        private _route: ActivatedRoute,
+        private _router: Router,
+        private _device: DeviceService,
+        private _chartOptions: ChartOptions,
+        private _dialog: MatDialog,
+        private _openSearch: OpenSearch,
+        private _utils: UtilsService,
+    ) {
+    }
 
-  navigateMonitoringDevices() {
-    this._router.navigate(['/monitoring/resources'], {state: {}});
-  }
+    ngOnInit() {
+        this.deviceName = this._route.snapshot.paramMap.get('deviceName');
+        this.deviceIp = this._route.snapshot.paramMap.get('deviceIp');
+        // setTimeout(()=>{
+        //   interval(this.currentInterval * 1000)
+        //     .pipe(
+        //       startWith(0),
+        //       tap(() => this.getBasicMonitoringMetrics()),
+        //       takeUntilDestroyed(this.destroyRef)
+        //     )
+        //     .subscribe();
+        // })
+        // ToDo: Enable auto-refresh
+        this.getBasicMonitoringMetrics();
+    }
 
-  onTabChange($event: any) {
-    if ($event.index === 0) {
-      this.getBasicMonitoringMetrics()
-    } else if ($event.index === 1) {
+    navigateMonitoringDevices() {
+        this._router.navigate(['/monitoring/resources'], {state: {}});
+    }
 
+    onTabChange($event: any) {
+        if ($event.index === 0) {
+            this.getBasicMonitoringMetrics()
+        } else if ($event.index === 1) {
+            this.getAuditMonitoringMetrics();
+        }
     }
-  }
 
-  getBasicMonitoringMetrics() {
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "cpu_usage",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    });
+    getBasicMonitoringMetrics() {
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "cpu_usage",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        });
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "memory_usage",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "memory_usage",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "disk_usage",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "disk_usage",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "network_throughput",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "network_throughput",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "ssl_connections",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "ssl_connections",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "connections",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "connections",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "requests",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "requests",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
 
-    this.getDeviceMonitoringMetrics({
-      "metric_name": "ssl_core_utilization",
-      "agent_host": this.deviceIp,
-      "interval": "10s",
-      "from": this.currentFrom,
-      "to": this.currentTo,
-    })
-  }
+        this.getDeviceMonitoringMetrics({
+            "metric_name": "ssl_core_utilization",
+            "agent_host": this.deviceIp,
+            "interval": "10s",
+            "from": this.currentFrom,
+            "to": this.currentTo,
+        })
+    }
 
-  getDeviceMonitoringMetrics(payload: any) {
-    this._device.getDeviceMonitoringMetrics(payload).pipe(take(1)).subscribe({
-      next: (result: any) => {
-        if (payload?.metric_name === 'cpu_usage') {
-          const cpu_data_formatted: any = result?.data.map((d: any) => [d.ts, d.cpu]);
-          this.cpuChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'CPU', unit: 'Percentage'}, cpu_data_formatted);
-        } else if (payload?.metric_name === 'memory_usage') {
-          const memory_data_formatted: any = result?.data.map((d: any) => [d.ts, d.memory_usage]);
-          this.memoryChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Memory', unit: 'Percentage'}, memory_data_formatted);
-        } else if (payload?.metric_name === 'disk_usage') {
-          const disk_data_formatted: any = result?.data.map((d: any) => [d.ts, d.disk_usage]);
-          this.diskUsageChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Disk', unit: 'Percentage'}, disk_data_formatted);
-        } else if (payload?.metric_name === 'network_throughput') {
-          const factor: any = 1024 * 1024;
-          const sent_data_formatted: any = result?.data.map((d: any) => [d.ts, d.sent / factor]);
-          const received_data_formatted: any = result?.data.map((d: any) => [d.ts, d.received / factor]);
-          this.throughputChartOptions = this._chartOptions.historicalThroughputChartOptions(received_data_formatted, sent_data_formatted);
-        } else if (payload?.metric_name === 'ssl_connections') {
-          const data_formatted: any = result?.data.map((d: any) => [d.ts, d.ssl_connection]);
-          this.sslConnectionsChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'SSL Connections', unit: '#'}, data_formatted);
-        } else if (payload?.metric_name === 'connections') {
-          const data_formatted: any = result?.data.map((d: any) => [d.ts, d.connection]);
-          this.connectionsChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Connections', unit: '#'}, data_formatted);
-        } else if (payload?.metric_name === 'requests') {
-          const data_formatted: any = result?.data.map((d: any) => [d.ts, d.requests]);
-          this.requestsChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Requests', unit: '#'}, data_formatted);
-        } else if (payload?.metric_name === 'ssl_core_utilization') {
-          const ae_core_formatted = result?.data
-            .filter((d: any) => d.ssl_ae_core !== null)
-            .map((d: any) => [new Date(d.ts).getTime(), parseFloat(d.ssl_ae_core)]);
-          const se_core_formatted = result?.data
-            .filter((d: any) => d.ssl_se_core !== null)
-            .map((d: any) => [new Date(d.ts).getTime(), parseFloat(d.ssl_se_core)]);
-          this.sslCoreChartOptions = this._chartOptions.plotDoubleLineChartOptions({label: ['AE Core', 'SE Core'], unit: 'Percentage'}, ae_core_formatted, se_core_formatted)
-       }
-      },
-      error: (error: any) => {
-        console.log(error);
-      }
-    });
-  }
+    getDeviceMonitoringMetrics(payload: any) {
+        this._device.getDeviceMonitoringMetrics(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                if (payload?.metric_name === 'cpu_usage') {
+                    const cpu_data_formatted: any = result?.data.map((d: any) => [d.ts, d.cpu]);
+                    this.cpuChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                        label: 'CPU',
+                        unit: 'Percentage'
+                    }, cpu_data_formatted);
+                } else if (payload?.metric_name === 'memory_usage') {
+                    const memory_data_formatted: any = result?.data.map((d: any) => [d.ts, d.memory_usage]);
+                    this.memoryChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                        label: 'Memory',
+                        unit: 'Percentage'
+                    }, memory_data_formatted);
+                } else if (payload?.metric_name === 'disk_usage') {
+                    const disk_data_formatted: any = result?.data.map((d: any) => [d.ts, d.disk_usage]);
+                    this.diskUsageChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                        label: 'Disk',
+                        unit: 'Percentage'
+                    }, disk_data_formatted);
+                } else if (payload?.metric_name === 'network_throughput') {
+                    const factor: any = 1024 * 1024;
+                    const sent_data_formatted: any = result?.data.map((d: any) => [d.ts, d.sent / factor]);
+                    const received_data_formatted: any = result?.data.map((d: any) => [d.ts, d.received / factor]);
+                    this.throughputChartOptions = this._chartOptions.historicalThroughputChartOptions(received_data_formatted, sent_data_formatted);
+                } else if (payload?.metric_name === 'ssl_connections') {
+                    const data_formatted: any = result?.data.map((d: any) => [d.ts, d.ssl_connection]);
+                    this.sslConnectionsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                        label: 'SSL Connections',
+                        unit: '#'
+                    }, data_formatted);
+                } else if (payload?.metric_name === 'connections') {
+                    const data_formatted: any = result?.data.map((d: any) => [d.ts, d.connection]);
+                    this.connectionsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                        label: 'Connections',
+                        unit: '#'
+                    }, data_formatted);
+                } else if (payload?.metric_name === 'requests') {
+                    const data_formatted: any = result?.data.map((d: any) => [d.ts, d.requests]);
+                    this.requestsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                        label: 'Requests',
+                        unit: '#'
+                    }, data_formatted);
+                } else if (payload?.metric_name === 'ssl_core_utilization') {
+                    const ae_core_formatted = result?.data
+                        .filter((d: any) => d.ssl_ae_core !== null)
+                        .map((d: any) => [new Date(d.ts).getTime(), parseFloat(d.ssl_ae_core)]);
+                    const se_core_formatted = result?.data
+                        .filter((d: any) => d.ssl_se_core !== null)
+                        .map((d: any) => [new Date(d.ts).getTime(), parseFloat(d.ssl_se_core)]);
+                    this.sslCoreChartOptions = this._chartOptions.plotDoubleLineChartOptions({
+                        label: ['AE Core', 'SE Core'],
+                        unit: 'Percentage'
+                    }, ae_core_formatted, se_core_formatted)
+                }
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
+    }
 
-  openTimeFilterDialog(): void {
-    const dialogRef = this._dialog.open(TimeFilter, {
-      width: '600px',
-      data: {
-        initialFrom: this.currentFrom,
-        initialTo: this.currentTo,
-        initialInterval: this.currentInterval
-      }
-    });
+    getAuditMonitoringMetrics() {
+        // ToDo: Add additional audit monitoring graphs using the RTT
+        let payload: any = {
+            "size": 0,
+            "query": {
+                "bool": {
+                    "filter": [
+                        {
+                            "range": {
+                                "@timestamp": {
+                                    "gte": this.currentFrom,
+                                    "lte": this.currentTo
+                                }
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "http_status_code"
+                            }
+                        },
+                        {
+                            "term": {
+                                "device_ip": this.deviceIp
+                            }
+                        }
+                    ]
+                }
+            },
+            "aggs": {
+                "http_status_code_counts": {
+                    "terms": {
+                        "field": "http_status_code",
+                        "size": 10
+                    }
+                }
+            }
+        };
+        this._openSearch.queryOSLogs(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                let data = result?.aggregations?.http_status_code_counts.buckets;
+                const data_formatted: { value: any; name: string }[] = [];
+                data.forEach((d: any) => {
+                    data_formatted.push({
+                        value: d.doc_count,
+                        name: `Status Code - ${d.key}`
+                    })
+                })
+                this.httpStatusRatioChartOptions = this._chartOptions.distributionChartOptions('HTTP Status Codes', data_formatted);
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
 
-    dialogRef.componentInstance.applyRange.subscribe((result: TimeRange) => {
-      if (result) {
-        this.currentFrom = result.from;
-        this.currentTo = result.to;
-        this.currentInterval = result.interval || 10;
-        this.getBasicMonitoringMetrics()
-      }
-    });
+        payload = {
+            "size": 0,
+            "query": {
+                "bool": {
+                    "filter": [
+                        {
+                            "range": {
+                                "@timestamp": {
+                                    "gte": this.currentFrom,
+                                    "lte": this.currentTo
+                                }
+                            }
+                        },
+                        {
+                            "term": {
+                                "device_ip": this.deviceIp
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "virtual_server"
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "client_ip"
+                            }
+                        }
+                    ]
+                }
+            },
+            "aggs": {
+                "visits_over_time": {
+                    "auto_date_histogram": {
+                        "field": "@timestamp",
+                        "buckets": 60,
+                    },
+                }
+            }
+        }
+        this._openSearch.queryOSLogs(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                let data = result?.aggregations?.visits_over_time.buckets;
+                const data_formatted: any = data.map((d: any) => [d.key, d.doc_count]);
+                this.vSVisitsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                    label: 'Number of VS Visits',
+                    unit: 'Percentage'
+                }, data_formatted);
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
 
-    dialogRef.afterClosed().subscribe(() => {});
-  }
+        payload = {
+            "size": 0,
+            "query": {
+                "bool": {
+                    "filter": [
+                        {
+                            "range": {
+                                "@timestamp": {
+                                    "gte": this.currentFrom,
+                                    "lte": this.currentTo
+                                }
+                            }
+                        },
+                        {
+                            "term": {
+                                "device_ip": this.deviceIp
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "virtual_server"
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "client_ip"
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "duration_seconds"
+                            }
+                        }
+                    ]
+                }
+            },
+            "aggs": {
+                "response_time_over_time": {
+                    "auto_date_histogram": {
+                        "field": "@timestamp",
+                        "buckets": 60,
+                    },
+                    "aggs": {
+                        "response_time_percentiles": {
+                            "percentiles": {
+                                "field": "duration_seconds",
+                                "percents": [
+                                    50,
+                                    95,
+                                    99
+                                ]
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        this._openSearch.queryOSLogs(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                let data = result?.aggregations?.response_time_over_time.buckets;
+                const data_formatted: any = this._utils.formatResponseTimePercentiles(data, 'response_time_percentiles')
+                this.vSRespTimeChartOptions = this._chartOptions.plotTripleLineChartOptions({
+                    label: ['P50 Response Time', 'P95 Response Time', 'P99 Response Time'],
+                    unit: 'Milliseconds (ms)'
+                }, [data_formatted?.p50_formatted, data_formatted?.p95_formatted, data_formatted?.p99_formatted]);
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
+    }
+
+    openTimeFilterDialog(): void {
+        const dialogRef = this._dialog.open(TimeFilter, {
+            width: '600px',
+            data: {
+                initialFrom: this.currentFrom,
+                initialTo: this.currentTo,
+                initialInterval: this.currentInterval
+            }
+        });
+
+        dialogRef.componentInstance.applyRange.subscribe((result: TimeRange) => {
+            if (result) {
+                this.currentFrom = result.from;
+                this.currentTo = result.to;
+                this.currentInterval = result.interval || 10;
+                this.getBasicMonitoringMetrics()
+            }
+        });
+
+        dialogRef.afterClosed().subscribe(() => {
+        });
+    }
 }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-llb/resource-monitoring-llb.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-llb/resource-monitoring-llb.html	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-llb/resource-monitoring-llb.html	(working copy)
@@ -10,7 +10,7 @@
           <ng-container matColumnDef="serviceName">
             <th mat-header-cell *matHeaderCellDef>Service Name</th>
             <td mat-cell *matCellDef="let element">
-              <a class="details-page-link" (click)="goToDetails(element)">{{ element?.service_name }}</a>
+              <a class="details-page-link" (click)="goToDetails(element)">{{ element?.link_name }}</a>
             </td>
           </ng-container>
           <ng-container matColumnDef="gatewayIp">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-llb/resource-monitoring-llb.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-llb/resource-monitoring-llb.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-llb/resource-monitoring-llb.ts	(working copy)
@@ -6,7 +6,6 @@
 import {NotificationService} from '../../../services/notification';
 import {take} from 'rxjs/operators';
 import {GlobalSerialPipe} from '../../../pipes/global-serial-pipe';
-import {SystemService} from '../../../services/system-service';
 import {BytesPerSecPipe} from '../../../pipes/bytes-per-sec-pipe';
 import {Router} from '@angular/router';
 
@@ -50,7 +49,7 @@
           this.groups = data.groups;
           this.devices.forEach((device: any) => {
             if ((device?.type.toLowerCase() === 'apv' || device?.type.toLowerCase() === 'vapv') && device?.connection) {
-              devices.push(device?.ip);
+              devices.push(device);
             }
           })
           this.getLLBMonitoringMetrics(devices);
@@ -62,7 +61,7 @@
   }
 
   getLLBMonitoringMetrics(devices: any) {
-    let payload = {agent_host: devices, stat_name: 'summary_data'}
+    let payload = {agent_host: devices?.ip, stat_name: 'summary_data'}
     this._device.getLLBMonitoringMetrics(payload)
       .pipe(take(1))
       .subscribe({
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-slb-virtual-details/resource-monitoring-slb-virtual-details.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-slb-virtual-details/resource-monitoring-slb-virtual-details.html	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-slb-virtual-details/resource-monitoring-slb-virtual-details.html	(working copy)
@@ -1,161 +1,156 @@
 <mat-card class="page-card-1" appearance="filled">
-  <mat-card-header>
-    <mat-card-title>
-      <a class="back-to-main-page" (click)="navigateMonitoringDevices()">
-        <fa-icon [icon]="['far', 'circle-left']"></fa-icon>
-        Monitoring Devices - {{ serviceName }}
-      </a>
-    </mat-card-title>
-  </mat-card-header>
+    <mat-card-header>
+        <mat-card-title>
+            <a class="back-to-main-page" (click)="navigateMonitoringDevices()">
+                <fa-icon [icon]="['far', 'circle-left']"></fa-icon>
+                Monitoring Devices - {{ serviceName }}
+            </a>
+        </mat-card-title>
+    </mat-card-header>
 </mat-card>
+<div class="button-container time-filter">
+    <a class="a-link a-link-color" (click)="openTimeFilterDialog()">Current Range: {{ currentFrom }}
+        to {{ currentTo }} (Refresh: {{ currentInterval }})</a>
+</div>
 <mat-tab-group mat-stretch-tabs="false" animationDuration="0ms" [selectedIndex]="selectedTabIndex"
                (selectedTabChange)="onTabChange($event)">
-  <mat-tab label="Basic Monitoring">
-    <ng-template matTabContent>
-      <div class="button-container time-filter">
-        <a class="a-link a-link-color" (click)="openTimeFilterDialog()">Current Range: {{ currentFrom }}
-          to {{ currentTo }} (Refresh: {{ currentInterval }})</a>
-      </div>
-      <div class="tab-content">
-        <mat-grid-list cols="3" rowHeight="100px">
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text"> Network Throughput (bps)</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <div echarts [options]="throughputChartOptions" class="chart-container"></div>
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Hits</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <div echarts [options]="totalHitsChartOptions" class="chart-container"></div>
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Hits Distribution</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <div echarts [options]="hitsDistributionChartOptions" class="chart-container"></div>
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Open Connections</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <div echarts [options]="connectionsChartOptions" class="chart-container"></div>
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Connections Per Second</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <div echarts [options]="connectionPerSecondChartOptions" class="chart-container"></div>
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-        </mat-grid-list>
-      </div>
-    </ng-template>
-  </mat-tab>
-  <mat-tab label="Audit Monitoring">
-    <ng-template matTabContent>
-      <div class="tab-content">
-        <mat-grid-list cols="3" rowHeight="100px">
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">HTTP Status Code Ratio</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--                  <div echarts [options]="cpuChartOptions" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Number Of Virtual Service Visits</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--                  <div echarts [options]="cpuChartOptions" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-          <mat-grid-tile colspan="1" rowspan="3">
-            <mat-card class="dashboard-card" appearance="outlined">
-              <mat-card-content class="card-content-wrapper">
-                <div class="card-header-row">
-                  <mat-card-title class="card-title">
-                    <span class="card-title-text">Client To Device Time</span>
-                    <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
-                    <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
-                  </mat-card-title>
-                </div>
-                <div class="chart-flex-container">
-                  <!--                  <div echarts [options]="cpuChartOptions" class="chart-container"></div>-->
-                </div>
-              </mat-card-content>
-            </mat-card>
-          </mat-grid-tile>
-        </mat-grid-list>
-      </div>
-    </ng-template>
-  </mat-tab>
+    <mat-tab label="Basic Monitoring">
+        <ng-template matTabContent>
+            <div class="tab-content">
+                <mat-grid-list cols="3" rowHeight="100px">
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text"> Network Throughput (bps)</span>
+                                        <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
+                                        <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="throughputChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">Hits</span>
+                                        <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
+                                        <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="totalHitsChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">Hits Distribution</span>
+                                        <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
+                                        <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="hitsDistributionChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">Open Connections</span>
+                                        <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
+                                        <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="connectionsChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">Connections Per Second</span>
+                                        <!--            <fa-icon [icon]="['fas', 'expand']" class="fa-1x a-link" matTooltip="Expand"-->
+                                        <!--                     (click)="enlargeSystemLoad()"></fa-icon>-->
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="connectionPerSecondChartOptions"
+                                         class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                </mat-grid-list>
+            </div>
+        </ng-template>
+    </mat-tab>
+    <mat-tab label="Audit Monitoring">
+        <ng-template matTabContent>
+            <div class="tab-content">
+                <mat-grid-list cols="3" rowHeight="100px">
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">HTTP Status Code Ratio</span>
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="httpStatusRatioChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">Number Of Virtual Service Visits</span>
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="vSVisitsChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                    <mat-grid-tile colspan="1" rowspan="3">
+                        <mat-card class="dashboard-card" appearance="outlined">
+                            <mat-card-content class="card-content-wrapper">
+                                <div class="card-header-row">
+                                    <mat-card-title class="card-title">
+                                        <span class="card-title-text">Client To Device Time</span>
+                                    </mat-card-title>
+                                </div>
+                                <div class="chart-flex-container">
+                                    <div echarts [options]="vSRespTimeChartOptions" class="chart-container"></div>
+                                </div>
+                            </mat-card-content>
+                        </mat-card>
+                    </mat-grid-tile>
+                </mat-grid-list>
+            </div>
+        </ng-template>
+    </mat-tab>
 </mat-tab-group>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-slb-virtual-details/resource-monitoring-slb-virtual-details.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-slb-virtual-details/resource-monitoring-slb-virtual-details.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/resource-monitoring-slb-virtual-details/resource-monitoring-slb-virtual-details.ts	(working copy)
@@ -8,188 +8,403 @@
 import {ChartOptions} from '../../../services/chart-options';
 import {TimeFilter, TimeRange} from '../../common/time-filter/time-filter';
 import {MatDialog} from '@angular/material/dialog';
+import {OpenSearch} from "../../../services/open-search";
+import {UtilsService} from "../../../services/utils-service";
 
 @Component({
-  selector: 'app-resource-monitoring-slb-virtual-details',
-  imports: [
-    SharedModule
-  ],
-  templateUrl: './resource-monitoring-slb-virtual-details.html',
-  styleUrl: './resource-monitoring-slb-virtual-details.scss'
+    selector: 'app-resource-monitoring-slb-virtual-details',
+    imports: [
+        SharedModule
+    ],
+    templateUrl: './resource-monitoring-slb-virtual-details.html',
+    styleUrl: './resource-monitoring-slb-virtual-details.scss'
 })
 export class ResourceMonitoringSlbVirtualDetails implements OnInit {
 
-  deviceIp: string = '';
-  serviceName: string = '';
+    deviceIp: string = '';
+    serviceName: string = '';
 
-  selectedTabIndex: number = 0;
-  private tabNames: string[] = [
-    'Basic Monitoring',
-    'Audit Monitoring',
-  ];
+    selectedTabIndex: number = 0;
+    private tabNames: string[] = [
+        'Basic Monitoring',
+        'Audit Monitoring',
+    ];
 
-  currentFrom: string | Date = 'now-15m';
-  currentTo: string | Date = 'now';
-  currentInterval: number = 10;
-  private destroyRef = inject(DestroyRef);
+    currentFrom: string | Date = 'now-15m';
+    currentTo: string | Date = 'now';
+    currentInterval: number = 10;
+    private destroyRef = inject(DestroyRef);
 
-  constructor(
-    private _route: ActivatedRoute,
-    private _router: Router,
-    private _device: DeviceService,
-    private _notification: NotificationService,
-    private _chartOptions: ChartOptions,
-    private _dialog: MatDialog,
-  ) {
-  }
+    httpStatusRatioChartOptions: EChartsOption = {};
+    vSVisitsChartOptions: EChartsOption = {};
+    vSRespTimeChartOptions: EChartsOption = {};
 
-  ngOnInit() {
-    this.deviceIp = this._route.snapshot.paramMap.get('deviceIp') || '';
-    this.serviceName = this._route.snapshot.paramMap.get('serviceName') || '';
-    // setTimeout(()=>{
-    //   interval(this.currentInterval * 1000)
-    //     .pipe(
-    //       startWith(0),
-    //       tap(() => this.getBasicMonitoringMetrics()),
-    //       takeUntilDestroyed(this.destroyRef)
-    //     )
-    //     .subscribe();
-    // })
-    // ToDo: Enable auto-refresh
-    this.getBasicMonitoringMetrics()
-  }
+    currentTab: string = 'Basic Monitoring';
 
-  onTabChange($event: any) {
-    if ($event.index === 0) {
-      this.getBasicMonitoringMetrics()
-    } else if ($event.index === 1) {
+    constructor(
+        private _route: ActivatedRoute,
+        private _router: Router,
+        private _device: DeviceService,
+        private _notification: NotificationService,
+        private _chartOptions: ChartOptions,
+        private _dialog: MatDialog,
+        private _openSearch: OpenSearch,
+        private _utils: UtilsService
+    ) {
+    }
 
+    ngOnInit() {
+        this.deviceIp = this._route.snapshot.paramMap.get('deviceIp') || '';
+        this.serviceName = this._route.snapshot.paramMap.get('serviceName') || '';
+        // setTimeout(()=>{
+        //   interval(this.currentInterval * 1000)
+        //     .pipe(
+        //       startWith(0),
+        //       tap(() => this.getBasicMonitoringMetrics()),
+        //       takeUntilDestroyed(this.destroyRef)
+        //     )
+        //     .subscribe();
+        // })
+        // ToDo: Enable auto-refresh
+        this.getBasicMonitoringMetrics()
     }
-  }
 
-  navigateMonitoringDevices() {
-    this._router.navigate(['/monitoring/resources'], {state: {}});
-  }
+    onTabChange($event: any) {
+        if ($event.index === 0) {
+            this.getBasicMonitoringMetrics();
+            this.currentTab = 'Basic Monitoring';
+        } else if ($event.index === 1) {
+            this.getAuditMonitoringMetrics();
+            this.currentTab = 'Audit Monitoring';
+        }
+    }
 
-  getBasicMonitoringMetrics() {
-    this.getAPVVSMonitoringMetrics({
-      agent_host: this.deviceIp,
-      server_id: this.serviceName,
-      from: this.currentFrom,
-      to: this.currentTo,
-      stat_name: 'network_throughput'
-    })
-    this.getAPVVSMonitoringMetrics({
-      agent_host: this.deviceIp,
-      server_id: this.serviceName,
-      from: this.currentFrom,
-      to: this.currentTo,
-      stat_name: 'total_hits'
-    })
-    this.getAPVVSMonitoringMetrics({
-      agent_host: this.deviceIp,
-      server_id: this.serviceName,
-      from: this.currentFrom,
-      to: this.currentTo,
-      stat_name: 'hits_distribution'
-    })
-    this.getAPVVSMonitoringMetrics({
-      agent_host: this.deviceIp,
-      server_id: this.serviceName,
-      from: this.currentFrom,
-      to: this.currentTo,
-      stat_name: 'connection_count'
-    })
-    this.getAPVVSMonitoringMetrics({
-      agent_host: this.deviceIp,
-      server_id: this.serviceName,
-      from: this.currentFrom,
-      to: this.currentTo,
-      stat_name: 'connections_per_sec'
-    })
-  }
+    navigateMonitoringDevices() {
+        this._router.navigate(['/monitoring/resources'], {state: {}});
+    }
 
-  throughputChartOptions: EChartsOption = {};
-  totalHitsChartOptions: EChartsOption = {};
-  hitsDistributionChartOptions: EChartsOption = {};
-  connectionsChartOptions: EChartsOption = {};
-  connectionPerSecondChartOptions: EChartsOption = {};
+    getBasicMonitoringMetrics() {
+        this.getAPVVSMonitoringMetrics({
+            agent_host: this.deviceIp,
+            server_id: this.serviceName,
+            from: this.currentFrom,
+            to: this.currentTo,
+            stat_name: 'network_throughput'
+        })
+        this.getAPVVSMonitoringMetrics({
+            agent_host: this.deviceIp,
+            server_id: this.serviceName,
+            from: this.currentFrom,
+            to: this.currentTo,
+            stat_name: 'total_hits'
+        })
+        this.getAPVVSMonitoringMetrics({
+            agent_host: this.deviceIp,
+            server_id: this.serviceName,
+            from: this.currentFrom,
+            to: this.currentTo,
+            stat_name: 'hits_distribution'
+        })
+        this.getAPVVSMonitoringMetrics({
+            agent_host: this.deviceIp,
+            server_id: this.serviceName,
+            from: this.currentFrom,
+            to: this.currentTo,
+            stat_name: 'connection_count'
+        })
+        this.getAPVVSMonitoringMetrics({
+            agent_host: this.deviceIp,
+            server_id: this.serviceName,
+            from: this.currentFrom,
+            to: this.currentTo,
+            stat_name: 'connections_per_sec'
+        })
+    }
 
-  getAPVVSMonitoringMetrics(payload: any) {
-    this._device.getAPVVSMonitoringMetrics(payload)
-      .pipe(take(1))
-      .subscribe({
-        next: (result: any) => {
-          if (payload?.stat_name === 'network_throughput') {
-            const factor: any = 1024 * 1024;
-            const sent_data_formatted: any = result?.data.map((d: any) => [d.ts, d.sent / factor]);
-            const received_data_formatted: any = result?.data.map((d: any) => [d.ts, d.received / factor]);
-            this.throughputChartOptions = this._chartOptions.historicalThroughputChartOptions(received_data_formatted, sent_data_formatted);
-          } else if (payload?.stat_name === 'total_hits') {
-            let hits = result?.data;
-            const data_formatted = hits.map((d: any) => [
-              new Date(d.ts).getTime(),
-              d.hit_diff !== null ? parseInt(d.hit_diff) : 0,
-            ]);
-            this.totalHitsChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Total Hits', unit: '#'}, data_formatted);
-          } else if (payload?.stat_name === 'hits_distribution') {
-            let hits: any = {};
-            if (result?.data.length > 0) {
-              hits = result?.data[0];
-            }
-            const data_formatted: { value: any; name: string }[] = [];
-            for (const key in hits) {
-              if (hits.hasOwnProperty(key) && hits[key] !== null) {
-                const formattedName = key.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
-                data_formatted.push({
-                  value: hits[key],
-                  name: formattedName
-                });
-              }
-            }
-            this.hitsDistributionChartOptions = this._chartOptions.distributionChartOptions('Hits', data_formatted);
-          } else if (payload?.stat_name === 'connection_count') {
-            let connections = result?.data;
-            const data_formatted = connections.map((d: any) => [
-              new Date(d.ts).getTime(),
-              d.connections !== null ? parseInt(d.conn_cnt) : 0,
-            ]);
-            this.connectionsChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Connections', unit: '#'}, data_formatted);
-          } else if (payload?.stat_name === 'connections_per_sec') {
-            let connections = result?.data;
-            const data_formatted = connections.map((d: any) => [
-              new Date(d.ts).getTime(),
-              d.connection !== null ? parseInt(d.connection) : 0,
-            ]);
-            this.connectionPerSecondChartOptions = this._chartOptions.plotSingleLineChartOptions({label: 'Connections', unit: '#'}, data_formatted);
-          }
-        },
-        error: (error: { message: string; }) => {
-          console.log(error);
-          this._notification.showError(error.message);
-        }
-      })
-  }
+    throughputChartOptions: EChartsOption = {};
+    totalHitsChartOptions: EChartsOption = {};
+    hitsDistributionChartOptions: EChartsOption = {};
+    connectionsChartOptions: EChartsOption = {};
+    connectionPerSecondChartOptions: EChartsOption = {};
 
-  openTimeFilterDialog(): void {
-    const dialogRef = this._dialog.open(TimeFilter, {
-      width: '600px',
-      data: {
-        initialFrom: this.currentFrom,
-        initialTo: this.currentTo,
-        initialInterval: this.currentInterval
-      }
-    });
-
-    dialogRef.componentInstance.applyRange.subscribe((result: TimeRange) => {
-      if (result) {
-        this.currentFrom = result.from;
-        this.currentTo = result.to;
-        this.currentInterval = result.interval || 10;
-        this.getBasicMonitoringMetrics()
-      }
-    });
+    getAPVVSMonitoringMetrics(payload: any) {
+        this._device.getAPVVSMonitoringMetrics(payload)
+            .pipe(take(1))
+            .subscribe({
+                next: (result: any) => {
+                    if (payload?.stat_name === 'network_throughput') {
+                        const factor: any = 1024 * 1024;
+                        const sent_data_formatted: any = result?.data.map((d: any) => [d.ts, d.sent / factor]);
+                        const received_data_formatted: any = result?.data.map((d: any) => [d.ts, d.received / factor]);
+                        this.throughputChartOptions = this._chartOptions.historicalThroughputChartOptions(received_data_formatted, sent_data_formatted);
+                    } else if (payload?.stat_name === 'total_hits') {
+                        let hits = result?.data;
+                        const data_formatted = hits.map((d: any) => [
+                            new Date(d.ts).getTime(),
+                            d.hit_diff !== null ? parseInt(d.hit_diff) : 0,
+                        ]);
+                        this.totalHitsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                            label: 'Total Hits',
+                            unit: '#'
+                        }, data_formatted);
+                    } else if (payload?.stat_name === 'hits_distribution') {
+                        let hits: any = {};
+                        if (result?.data.length > 0) {
+                            hits = result?.data[0];
+                        }
+                        const data_formatted: { value: any; name: string }[] = [];
+                        for (const key in hits) {
+                            if (hits.hasOwnProperty(key) && hits[key] !== null) {
+                                const formattedName = key.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
+                                data_formatted.push({
+                                    value: hits[key],
+                                    name: formattedName
+                                });
+                            }
+                        }
+                        this.hitsDistributionChartOptions = this._chartOptions.distributionChartOptions('Hits', data_formatted);
+                    } else if (payload?.stat_name === 'connection_count') {
+                        let connections = result?.data;
+                        const data_formatted = connections.map((d: any) => [
+                            new Date(d.ts).getTime(),
+                            d.connections !== null ? parseInt(d.conn_cnt) : 0,
+                        ]);
+                        this.connectionsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                            label: 'Connections',
+                            unit: '#'
+                        }, data_formatted);
+                    } else if (payload?.stat_name === 'connections_per_sec') {
+                        let connections = result?.data;
+                        const data_formatted = connections.map((d: any) => [
+                            new Date(d.ts).getTime(),
+                            d.connection !== null ? parseInt(d.connection) : 0,
+                        ]);
+                        this.connectionPerSecondChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                            label: 'Connections',
+                            unit: '#'
+                        }, data_formatted);
+                    }
+                },
+                error: (error: { message: string; }) => {
+                    console.log(error);
+                    this._notification.showError(error.message);
+                }
+            })
+    }
 
-    dialogRef.afterClosed().subscribe(() => {});
-  }
+    getAuditMonitoringMetrics() {
+        let payload: any = {
+            "size": 0,
+            "query": {
+                "bool": {
+                    "filter": [
+                        {
+                            "range": {
+                                "@timestamp": {
+                                    "gte": this.currentFrom,
+                                    "lte": this.currentTo
+                                }
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "http_status_code"
+                            }
+                        },
+                        {
+                            "term": {
+                                "device_ip": this.deviceIp
+                            }
+                        },
+                        {
+                            "term": {
+                                "virtual_server": this.serviceName
+                            }
+                        },
+                    ]
+                }
+            },
+            "aggs": {
+                "http_status_code_counts": {
+                    "terms": {
+                        "field": "http_status_code",
+                        "size": 10
+                    }
+                }
+            }
+        };
+        this._openSearch.queryOSLogs(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                let data = result?.aggregations?.http_status_code_counts.buckets;
+                const data_formatted: { value: any; name: string }[] = [];
+                data.forEach((d: any) => {
+                    data_formatted.push({
+                        value: d.doc_count,
+                        name: `Status Code - ${d.key}`
+                    })
+                })
+                this.httpStatusRatioChartOptions = this._chartOptions.distributionChartOptions('HTTP Status Codes', data_formatted);
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
+        payload = {
+            "size": 0,
+            "query": {
+                "bool": {
+                    "filter": [
+                        {
+                            "range": {
+                                "@timestamp": {
+                                    "gte": this.currentFrom,
+                                    "lte": this.currentTo
+                                }
+                            }
+                        },
+                        {
+                            "term": {
+                                "device_ip": this.deviceIp,
+                            }
+                        },
+                        {
+                            "term": {
+                                "virtual_server": this.serviceName
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "virtual_server"
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "client_ip"
+                            }
+                        }
+                    ]
+                }
+            },
+            "aggs": {
+                "visits_over_time": {
+                    "auto_date_histogram": {
+                        "field": "@timestamp",
+                        "buckets": 60,
+                    }
+                }
+            }
+        }
+        this._openSearch.queryOSLogs(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                let data = result?.aggregations?.visits_over_time.buckets;
+                const data_formatted: any = data.map((d: any) => [d.key, d.doc_count]);
+                console.log(data_formatted);
+                this.vSVisitsChartOptions = this._chartOptions.plotSingleLineChartOptions({
+                    label: 'Number of VS Visits',
+                    unit: 'Percentage'
+                }, data_formatted);
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
+        payload = {
+            "size": 0,
+            "query": {
+                "bool": {
+                    "filter": [
+                        {
+                            "range": {
+                                "@timestamp": {
+                                    "gte": this.currentFrom,
+                                    "lte": this.currentTo
+                                }
+                            }
+                        },
+                        {
+                            "term": {
+                                "device_ip": this.deviceIp
+                            }
+                        },
+                        {
+                            "term": {
+                                "virtual_server": this.serviceName
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "client_ip"
+                            }
+                        },
+                        {
+                            "exists": {
+                                "field": "duration_seconds"
+                            }
+                        }
+                    ]
+                }
+            },
+            "aggs": {
+                "duration_over_time": {
+                    "auto_date_histogram": {
+                        "field": "@timestamp",
+                        "buckets": 60,
+                    },
+                    "aggs": {
+                        "duration_percentiles": {
+                            "percentiles": {
+                                "field": "duration_seconds",
+                                "percents": [
+                                    50,
+                                    95,
+                                    99
+                                ]
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        this._openSearch.queryOSLogs(payload).pipe(take(1)).subscribe({
+            next: (result: any) => {
+                let data = result?.aggregations?.duration_over_time.buckets;
+                const data_formatted: any = this._utils.formatResponseTimePercentiles(data, 'duration_percentiles')
+                console.log(data_formatted);
+                this.vSRespTimeChartOptions = this._chartOptions.plotTripleLineChartOptions({
+                    label: ['P50 Response Time', 'P95 Response Time', 'P99 Response Time'],
+                    unit: 'Milliseconds (ms)'
+                }, [data_formatted?.p50_formatted, data_formatted?.p95_formatted, data_formatted?.p99_formatted]);
+            },
+            error: (error: any) => {
+                console.log(error);
+            }
+        });
+    }
+
+    openTimeFilterDialog(): void {
+        const dialogRef = this._dialog.open(TimeFilter, {
+            width: '600px',
+            data: {
+                initialFrom: this.currentFrom,
+                initialTo: this.currentTo,
+                initialInterval: this.currentInterval
+            }
+        });
+
+        dialogRef.componentInstance.applyRange.subscribe((result: TimeRange) => {
+            if (result) {
+                this.currentFrom = result.from;
+                this.currentTo = result.to;
+                this.currentInterval = result.interval || 10;
+                if (this.currentTab === 'Basic Monitoring') {
+                    this.getBasicMonitoringMetrics()
+                } else {
+                    this.getAuditMonitoringMetrics();
+                }
+            }
+        });
+
+        dialogRef.afterClosed().subscribe(() => {
+        });
+    }
 }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/constants/api_urls.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/constants/api_urls.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/constants/api_urls.ts	(working copy)
@@ -213,6 +213,10 @@
   UPDATE_VAPV_LICENSE_KEY_URL: `${PREFIX}/proxy_req_dev/api/avx/system/system_mgmt/VaLicenseAssign/_perform?action=Assign`,
   CREATE_VAPV_LICENSE_REQUEST_FILE_URL: `${PREFIX}/proxy_req_dev/lic_requset_file/generate`,
   DELETE_AVX_VA_INSTANCE_URL: `${PREFIX}/proxy_req_dev/api/avx/va/instance/VAInstance/_delete`,
+  // Report
+  GET_LIST_OF_REPORTS_URL: `${PREFIX}/report`,
+  GET_DEVICE_SERVICES_URL: `${PREFIX}/cm/services`,
+  POST_CREATE_REPORT_URL: `${PREFIX}/report/save`,
   // OpenSearch
   GET_LOGS_FROM_OPENSEARCH_URL: `${PREFIX}/log-analysis/search`,
 } as const; // Makes properties readonly
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/chart-options.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/chart-options.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/chart-options.ts	(working copy)
@@ -404,6 +404,59 @@
     }
   }
 
+  plotTripleLineChartOptions(labels: any, chartData: any): EChartsOption {
+    return {
+      grid: {
+        left: '7%',
+        right: '1%',
+        bottom: '1%',
+        containLabel: true
+      },
+      tooltip: {
+        trigger: 'axis',
+        formatter: (params: any) => {
+          const date = new Date(params[0].value[0]);
+          const formattedTime = date.toLocaleTimeString('en-US', {
+            hour: '2-digit',
+            minute: '2-digit',
+            second: '2-digit',
+            hour12: false
+          });
+          let tooltipContent = `Time: ${formattedTime}<br/>`;
+          params.forEach((item: any) => {
+            tooltipContent += `${item.marker} ${item.seriesName}: ${item.value[1]}<br/>`;
+          });
+          return tooltipContent;
+        }
+      },
+      xAxis: {
+        type: 'time',
+        name: 'Time'
+      },
+      yAxis: {
+        type: 'value',
+        name: labels?.unit
+      },
+      series: [
+        {
+          name: labels?.label[0],
+          type: 'line',
+          data: chartData[0],
+        },
+        {
+          name: labels?.label[1],
+          type: 'line',
+          data: chartData[1],
+        },
+        {
+          name: labels?.label[2],
+          type: 'line',
+          data: chartData[2],
+        }
+      ]
+    }
+  }
+
   historicalDiskIOChartOptions(disk_io_data: any): EChartsOption {
     return {
       grid: {
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/device-service.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/device-service.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/device-service.ts	(working copy)
@@ -644,7 +644,29 @@
         csrf: true,
         isFormData: false,
         csrfInFormData: true
+      }
+    );
+  }
+
+  getReports() {
+    return this.http.get(URLS.GET_LIST_OF_REPORTS_URL);
+  }
+
+  getDeviceServices(payload: any) {
+    return this.http.post(URLS.GET_DEVICE_SERVICES_URL, payload, {
+        csrf: true,
+        isFormData: false,
+        csrfInFormData: false
       }
     );
   }
+
+  createReport(payload: any) {
+    return this.http.post(URLS.POST_CREATE_REPORT_URL, payload, {
+        csrf: true,
+        isFormData: false,
+        csrfInFormData: false
+      }
+    );
+  }
 }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/utils-service.ts
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/utils-service.ts	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/services/utils-service.ts	(working copy)
@@ -276,4 +276,32 @@
     const blob = new Blob([fileContent], { type: 'text/plain;charset=utf-8' });
     saveAs(blob, filename);
   }
+
+  formatResponseTimePercentiles = (buckets: any, key: any) => {
+    const p50_formatted: any = [];
+    const p95_formatted: any = [];
+    const p99_formatted: any = [];
+
+    buckets
+        .forEach((d: any) => {
+          const timestamp = new Date(d.key_as_string).getTime();
+          const p50_val = d[key]?.values["50.0"] ?? 0;
+          const p95_val = d[key]?.values["95.0"] ?? 0;
+          const p99_val = d[key]?.values["99.0"] ?? 0;
+
+          const p50 = Number(p50_val.toFixed(2));
+          const p95 = Number(p95_val.toFixed(2));
+          const p99 = Number(p99_val.toFixed(2));
+
+          p50_formatted.push([timestamp, p50]);
+          p95_formatted.push([timestamp, p95]);
+          p99_formatted.push([timestamp, p99]);
+        });
+
+    return {
+      p50_formatted,
+      p95_formatted,
+      p99_formatted
+    };
+  };
 }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/stop.sh
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/stop.sh	(revision 2743)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/stop.sh	(working copy)
@@ -1,13 +1,7 @@
 #!/bin/sh
 # Stop all daemon processes for new WebUI
 kill -9 `ps -auxww | awk '/[m]anage.py runfcgi/{print $2}'`
-/usr/local/bin/composer/composer_node stop composer_ui
-/usr/local/bin/composer/composer_node start influxd
-/usr/local/bin/composer/composer_node start composer_tele
-/usr/local/bin/composer/composer_node start composer_node
+
 # service acm_syslogd stop
 kill `ps -auxww | awk '/[i]nit_ftp_server.py/{print $2}'`
 kill `ps -auxww | awk '/[i]nit_tftp_server.py/{print $2}'`
-# kill `ps -auxww | awk '/[e]lasticsearch/{print $2}'`
-# systemctl stop kibana
-# systemctl stop elasticsearch
