Compare commits
27 Commits
main
...
debian-pac
Author | SHA1 | Date |
---|---|---|
|
54188a947a | |
|
5f228f1601 | |
|
dc555c94c9 | |
|
a3f9c9c88d | |
|
af97d9647b | |
|
8cccbe49de | |
|
61cb3071d0 | |
|
11adca57bc | |
|
c72a30718f | |
|
3271109e97 | |
|
a0e8f0e675 | |
|
33358c57b3 | |
|
b9e05cc771 | |
|
1a74077844 | |
|
288fc4beb1 | |
|
11a4236788 | |
|
261c382808 | |
|
dd7ab3e527 | |
|
b0d7a299fe | |
|
00dec46c6e | |
|
350274af7f | |
|
3e1caf1153 | |
|
0e139d1042 | |
|
0361323aed | |
|
407fb71e08 | |
|
b6a27c9b54 | |
|
0282911ab0 |
|
@ -0,0 +1 @@
|
|||
./etc
|
|
@ -0,0 +1,8 @@
|
|||
oglog for Debian
|
||||
|
||||
Please edit this to provide information specific to
|
||||
this oglog Debian package.
|
||||
|
||||
(Automatically generated by debmake Version 4.4.0)
|
||||
|
||||
-- vagrant <> Mon, 07 Jul 2025 11:17:41 +0000
|
|
@ -0,0 +1,6 @@
|
|||
oglog (0.0.1-11) UNRELEASED; urgency=low
|
||||
|
||||
* Initial release. Closes: #nnnn
|
||||
<nnnn is the bug number of your ITP>
|
||||
|
||||
-- Nicolas Arenas <narenas@qindel.com> Mon, 07 Jul 2025 11:17:41 +0000
|
|
@ -0,0 +1,18 @@
|
|||
Source: oglog
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Nicolas Arenas <narenas@qindel.com>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.6.1
|
||||
Homepage: https://opengnsys.es
|
||||
Rules-Requires-Root: no
|
||||
#Vcs-Git: https://salsa.debian.org/debian/oglog.git
|
||||
#Vcs-Browser: https://salsa.debian.org/debian/oglog
|
||||
|
||||
Package: oglog
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}, debconf (>= 0.5) | debconf-2.0 , opensearch , grafana, systemd-journal-remote, prometheus, journalbeat
|
||||
Description: auto-generated package by debmake
|
||||
This Debian binary package was auto-generated by the
|
||||
debmake(1) command provided by the debmake package.
|
|
@ -0,0 +1,51 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: oglog
|
||||
Upstream-Contact: <preferred name and address to reach the upstream project>
|
||||
Source: <url://example.com>
|
||||
#
|
||||
# Please double check copyright with the licensecheck(1) command.
|
||||
|
||||
Files: .env
|
||||
README.md
|
||||
etc/filebeat/filebeat.yml
|
||||
etc/grafana/grafana.ini
|
||||
etc/grafana/provisioning/alerting/alerts.yaml
|
||||
etc/grafana/provisioning/alerting/contactpoint.yaml
|
||||
etc/grafana/provisioning/dashboards/dashboard.yaml
|
||||
etc/grafana/provisioning/datasources/opensearch.yaml
|
||||
etc/grafana/provisioning/datasources/prometheus.yaml
|
||||
etc/grafana/resources/alerts/alert-rules.json
|
||||
etc/grafana/resources/dashboards/.json
|
||||
etc/grafana/resources/dashboards/Estado_actual_de_los_clientes.json
|
||||
etc/grafana/resources/dashboards/Node_Exporter_Full.json
|
||||
etc/grafana/resources/dashboards/Peticiones_nginx.json
|
||||
etc/grafana/resources/dashboards/Traceo_y_comandos.json
|
||||
etc/grafana/resources/dashboards/Uso_de_IPs_de_subred.json
|
||||
etc/grafana/resources/dashboards/null.json
|
||||
etc/grafana/resources/datasources/datasources.json
|
||||
etc/journalbeat/journalbeat.yml
|
||||
etc/opensearch-dashboards/opensearch_dashboards.yml
|
||||
etc/opensearch-dashboards/saved_searches.ndjson
|
||||
etc/opensearch/opensearch.yml
|
||||
etc/opensearch/pipelines.json
|
||||
etc/prometheus/prometheus.yml
|
||||
etc/prometheus/web-config.yml
|
||||
poc/Vagrantfile
|
||||
poc/mkcerts.sh
|
||||
script/Documentación script OgLog.md
|
||||
script/agent.sh
|
||||
script/export_grafana.sh
|
||||
script/import_grafana.sh
|
||||
script/journal-upload.sh
|
||||
script/mkcerts.sh
|
||||
script/oglog_installer.sh
|
||||
script/pipeline-bulk.sh
|
||||
script/pipeline-individual.sh
|
||||
script/pipeline.sh
|
||||
script/setup_grafana_token.sh
|
||||
Copyright: __NO_COPYRIGHT_NOR_LICENSE__
|
||||
License: __NO_COPYRIGHT_NOR_LICENSE__
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
|
||||
# license/copyright files.
|
|
@ -0,0 +1 @@
|
|||
oglog
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
# Mostrar las preguntas al usuario en orden deseado
|
||||
db_input high opengnsys/oglog_opensearchInitialPassword || true
|
||||
db_input high opengnsys/oglog_ogCoreIp || true
|
||||
db_input high opengnsys/oglog_ogLogIp || true
|
||||
db_input high opengnsys/oglog_subdomain || true
|
||||
db_input high opengnsys/oglog_certificateAltNames || true
|
||||
db_input high opengnsys/oglog_nodeExporterTargets || true
|
||||
|
||||
# Lanzar el diálogo con el usuario
|
||||
db_go
|
|
@ -0,0 +1,2 @@
|
|||
/opt/opengnsys/oglog/
|
||||
/var/log/journal/remote
|
|
@ -0,0 +1 @@
|
|||
etc /opt/opengnsys/oglog/
|
|
@ -0,0 +1,338 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
## Load configuration does not matter if we are installing or upgrading
|
||||
db_get opengnsys/oglog_opensearchInitialPassword
|
||||
OPENSEARCH_INITIAL_ADMIN_PASSWORD="$RET"
|
||||
db_get opengnsys/oglog_ogCoreIp
|
||||
OGCORE_SERVER="$RET"
|
||||
db_get opengnsys/oglog_ogLogIp
|
||||
OGLOG_SERVER="$RET"
|
||||
db_get opengnsys/oglog_subdomain
|
||||
SUBDOMAIN="$RET"
|
||||
db_get opengnsys/oglog_certificateAltNames
|
||||
CERT_ALT_NAMES="$RET"
|
||||
db_get opengnsys/oglog_nodeExporterTargets
|
||||
NODE_EXPORTER_TARGETS="$RET"
|
||||
|
||||
export OGCORE_SERVER
|
||||
export OGLOG_SERVER
|
||||
export SUBDOMAIN
|
||||
export OPENSEARCH_INITIAL_ADMIN_PASSWORD
|
||||
|
||||
## Global variables
|
||||
SSL_DIR="/opt/opengnsys/oglog/etc/certs"
|
||||
|
||||
backup_file() {
|
||||
local FILE="$1"
|
||||
if [ -f "$FILE" ]; then
|
||||
local BACKUP_FILE="${FILE}.bak"
|
||||
echo "Backing up $FILE to $BACKUP_FILE"
|
||||
cp "$FILE" "$BACKUP_FILE"
|
||||
else
|
||||
echo "File $FILE does not exist, skipping backup."
|
||||
fi
|
||||
}
|
||||
|
||||
generate_demo_cert() {
|
||||
local ALTNAMES="$1"
|
||||
local KEY="$SSL_DIR/server.key"
|
||||
local CERT="$SSL_DIR/server.crt"
|
||||
local CN=oglog.local
|
||||
|
||||
mkdir -p "$SSL_DIR"
|
||||
|
||||
# Crear archivo san.cnf para OpenSSL
|
||||
cat > "$SSL_DIR/san.cnf" <<EOF
|
||||
[req]
|
||||
distinguished_name=req_distinguished_name
|
||||
x509_extensions=v3_req
|
||||
prompt=no
|
||||
|
||||
[req_distinguished_name]
|
||||
CN=$CN
|
||||
|
||||
[v3_req]
|
||||
subjectAltName=@alt_names
|
||||
|
||||
[alt_names]
|
||||
EOF
|
||||
|
||||
# Inicializar contadores
|
||||
local dns_i=1
|
||||
local ip_i=1
|
||||
|
||||
IFS=',' read -ra SAN_ENTRIES <<< "$ALTNAMES"
|
||||
for entry in "${SAN_ENTRIES[@]}"; do
|
||||
if [[ $entry =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "IP.$ip_i = $entry" >> "$SSL_DIR/san.cnf"
|
||||
((ip_i++))
|
||||
elif [[ $entry =~ ^[a-zA-Z0-9.-]+$ ]]; then
|
||||
echo "DNS.$dns_i = $entry" >> "$SSL_DIR/san.cnf"
|
||||
((dns_i++))
|
||||
else
|
||||
echo "Ignorado (formato inválido): $entry"
|
||||
fi
|
||||
done
|
||||
|
||||
# Generar certificado
|
||||
openssl req -x509 -new -nodes -newkey rsa:2048 \
|
||||
-keyout "$KEY" \
|
||||
-out "$CERT" \
|
||||
-days 365 \
|
||||
-config "$SSL_DIR/san.cnf" \
|
||||
-extensions v3_req
|
||||
|
||||
chmod 0644 "$KEY"
|
||||
chmod 0644 "$CERT"
|
||||
|
||||
echo "Certificado generado con:"
|
||||
echo " - CN=$CN"
|
||||
echo " - SANs: $ALTNAMES"
|
||||
}
|
||||
|
||||
update_etc_hosts() {
|
||||
|
||||
local CN="oglog.local"
|
||||
local HOSTS_FILE="/etc/hosts"
|
||||
|
||||
# Si CN ya está en /etc/hosts, no hacemos nada
|
||||
|
||||
if grep -q "$CN" "$HOSTS_FILE"; then
|
||||
echo "El CN '$CN' ya está en $HOSTS_FILE, no se requiere actualización."
|
||||
return
|
||||
fi
|
||||
echo "Actualizando $HOSTS_FILE para incluir el CN '$CN'."
|
||||
# Agregar CN a la entrada de localhost en /etc/hosts
|
||||
sed -i "/127.0.0.1/s/$/ $CN/" /etc/hosts
|
||||
}
|
||||
|
||||
### Main script execution starts here ###
|
||||
|
||||
configure_file() {
|
||||
SRC_PATH=$1
|
||||
DEST_PATH=$2
|
||||
|
||||
if [ -f "$SRC_PATH" ]; then
|
||||
DEST_DIR=$(dirname "$DEST_PATH")
|
||||
mkdir -p "$DEST_DIR"
|
||||
echo "Configuring $DEST_PATH from $SRC_PATH"
|
||||
envsubst < "$SRC_PATH" > "$DEST_PATH"
|
||||
chmod 644 "$DEST_PATH"
|
||||
chown "$USER":"$GROUP" "$DEST_PATH"
|
||||
else
|
||||
echo "Source file $SRC_PATH does not exist, skipping configuration."
|
||||
fi
|
||||
}
|
||||
|
||||
configure_journal_remote() {
|
||||
OVERRIDE_DIR="/etc/systemd/system/systemd-journal-remote.service.d"
|
||||
OVERRIDE_FILE="${OVERRIDE_DIR}/override.conf"
|
||||
EXPECTED_CMD="/usr/lib/systemd/systemd-journal-remote --listen-http=-3 --seal=no --output=/var/log/journal/remote/"
|
||||
|
||||
if ! grep -qF "$EXPECTED_CMD" "$OVERRIDE_FILE" 2>/dev/null; then
|
||||
mkdir -p "$OVERRIDE_DIR"
|
||||
cat > "$OVERRIDE_FILE" <<EOF
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=$EXPECTED_CMD
|
||||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable systemd-journal-remote.service
|
||||
systemctl restart systemd-journal-remote.service
|
||||
fi
|
||||
}
|
||||
|
||||
configure_opensearch_certificates() {
|
||||
local DEST_CERTS_DIR="/etc/opensearch/certs"
|
||||
mkdir -p "$DEST_CERTS_DIR"
|
||||
cp "$SSL_DIR/server.crt" "$DEST_CERTS_DIR/server.crt"
|
||||
cp "$SSL_DIR/server.key" "$DEST_CERTS_DIR/server.key"
|
||||
chown opensearch:opensearch "$DEST_CERTS_DIR/server.crt"
|
||||
chown opensearch:opensearch "$DEST_CERTS_DIR/server.key"
|
||||
chmod 644 "$DEST_CERTS_DIR/server.crt"
|
||||
chmod 600 "$DEST_CERTS_DIR/server.key"
|
||||
|
||||
}
|
||||
|
||||
|
||||
configure_journalbeat_certificates() {
|
||||
local DEST_CERTS_DIR="/etc/journalbeat/certs"
|
||||
mkdir -p "$DEST_CERTS_DIR"
|
||||
cp "$SSL_DIR/server.crt" "$DEST_CERTS_DIR/server.crt"
|
||||
cp "$SSL_DIR/server.key" "$DEST_CERTS_DIR/server.key"
|
||||
chown root:root "$DEST_CERTS_DIR/server.crt"
|
||||
chown root:root "$DEST_CERTS_DIR/server.key"
|
||||
chmod 644 "$DEST_CERTS_DIR/server.crt"
|
||||
chmod 600 "$DEST_CERTS_DIR/server.key"
|
||||
}
|
||||
|
||||
configure_grafana(){
|
||||
local BASE_DIR="/etc/grafana"
|
||||
local TMPLATE_BASE_DIR="/opt/opengnsys/oglog/etc/grafana"
|
||||
local OPENSEARCH_TMPL_FILE="$TMPLATE_BASE_DIR/provisioning/datasources/opensearch.yaml"
|
||||
local OPENSEARCH_FILE="$BASE_DIR/provisioning/datasources/opensearch.yaml"
|
||||
local MYSQL_TMPL_FILE="$TMPLATE_BASE_DIR/provisioning/datasources/mysql.yaml"
|
||||
local MYSQL_FILE="$BASE_DIR/provisioning/datasources/mysql.yaml"
|
||||
|
||||
# Install OpenSearch datasource plugin if not already installed
|
||||
if ! grafana-cli plugins ls | grep -q "grafana-opensearch-datasource"; then
|
||||
echo "Installing OpenSearch datasource plugin for Grafana..."
|
||||
grafana-cli plugins install grafana-opensearch-datasource
|
||||
fi
|
||||
|
||||
envsubst < "$OPENSEARCH_TMPL_FILE" > "$OPENSEARCH_FILE"
|
||||
chown grafana:grafana "$OPENSEARCH_FILE"
|
||||
chmod 644 "$OPENSEARCH_FILE"
|
||||
echo "Configuring Grafana with OpenSearch datasource at $OPENSEARCH_FILE"
|
||||
|
||||
# Install MySQL datasource plugin if not already installed
|
||||
if ! grafana-cli plugins ls | grep -q "grafana-mysql-datasource"; then
|
||||
echo "Installing MySQL datasource plugin for Grafana..."
|
||||
grafana-cli plugins install grafana-mysql-datasource
|
||||
fi
|
||||
envsubst < "$MYSQL_TMPL_FILE" > "$MYSQL_FILE"
|
||||
chown grafana:grafana "$MYSQL_FILE"
|
||||
chmod 644 "$MYSQL_FILE"
|
||||
echo "Configuring Grafana with MySQL datasource at $MYSQL_FILE"
|
||||
|
||||
# Copy dashboards
|
||||
install -d /etc/grafana/dashboards
|
||||
cp -a /opt/opengnsys/oglog/etc/grafana/resources/dashboards/*.json /etc/grafana/dashboards/
|
||||
chown -R grafana:grafana /etc/grafana/dashboards
|
||||
systemctl restart grafana-server || true
|
||||
|
||||
}
|
||||
|
||||
create_opensearch_index() {
|
||||
|
||||
|
||||
echo "Creating OpenSearch index patterns and initial index..."
|
||||
echo "Creating OpenSearch index pattern filebeat-*"
|
||||
curl --insecure -X POST "https://${OGLOG_SERVER}:9200/.kibana/_doc/index-pattern:filebeat-*" \
|
||||
--user "admin:$OPENSEARCH_INITIAL_ADMIN_PASSWORD" \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"type": "index-pattern",
|
||||
"index-pattern": {
|
||||
"title": "filebeat-*",
|
||||
"timeFieldName": "@timestamp"
|
||||
}
|
||||
}'
|
||||
echo $?
|
||||
echo "Creating OpenSearch index pattern for journalbeat-*"
|
||||
curl --insecure -X POST "https://${OGLOG_SERVER}:9200/.kibana/_doc/index-pattern:journalbeat-*" \
|
||||
--user "admin:$OPENSEARCH_INITIAL_ADMIN_PASSWORD" \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"type": "index-pattern",
|
||||
"index-pattern": {
|
||||
"title": "journalbeat-*",
|
||||
"timeFieldName": "@timestamp"
|
||||
}
|
||||
}'
|
||||
echo $?
|
||||
echo "Creating OpenSearch index filebeat-000001"
|
||||
curl --insecure -X PUT "https://${OGLOG_SERVER}:9200/filebeat-000001" \
|
||||
--user "admin:$OPENSEARCH_INITIAL_ADMIN_PASSWORD" \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"@timestamp": { "type": "date" },
|
||||
"message": { "type": "text" }
|
||||
}
|
||||
}
|
||||
}'
|
||||
echo $?
|
||||
echo
|
||||
|
||||
## Import ingestion pipelines for opensearch
|
||||
echo "Importing OpenSearch ingestion pipelines..."
|
||||
jq -c 'to_entries[]' "/opt/opengnsys/oglog/etc/opensearch/pipelines.json" | while read -r entry
|
||||
do
|
||||
name=$(echo "$entry" | jq -r '.key')
|
||||
body=$(echo "$entry" | jq -c '.value')
|
||||
echo "Importing pipeline: $name"
|
||||
curl --insecure -X PUT "https://${OGLOG_SERVER}:9200/_ingest/pipeline/$name" \
|
||||
--user "admin:$OPENSEARCH_INITIAL_ADMIN_PASSWORD" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data "$body"
|
||||
echo
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
configure_prometheus() {
|
||||
local PROMETHEUS_CONFIG="/etc/prometheus/prometheus.yml"
|
||||
IFS=',' read -r -a HOST_ARRAY <<< "$NODE_EXPORTER_TARGETS"
|
||||
|
||||
# Configurar Prometheus para monitorear OpenSearch y OpenSearch Dashboards
|
||||
echo "Configuring Prometheus with OpenSearch and OpenSearch Dashboards targets..."
|
||||
cat > "$PROMETHEUS_CONFIG" <<EOF
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
scrape_configs:
|
||||
- job_name: 'node_exporter'
|
||||
static_configs:
|
||||
- targets:
|
||||
EOF
|
||||
for HOST in "${HOST_ARRAY[@]}"; do
|
||||
echo " - $HOST:9100" >> "$PROMETHEUS_CONFIG"
|
||||
done
|
||||
}
|
||||
|
||||
restart_services() {
|
||||
echo "Restarting services..."
|
||||
systemctl daemon-reload
|
||||
systemctl restart opensearch
|
||||
systemctl restart grafana-server
|
||||
systemctl restart journalbeat
|
||||
systemctl restart prometheus
|
||||
systemctl restart systemd-journal-remote
|
||||
}
|
||||
|
||||
case $1 in
|
||||
configure)
|
||||
PREV_VERSION="$2"
|
||||
if [ -z "$PREV_VERSION" ]; then
|
||||
# Instalación inicial
|
||||
echo "No previous version found, running initial configuration."
|
||||
backup_file "$SSL_DIR/server.key"
|
||||
backup_file "$SSL_DIR/server.crt"
|
||||
generate_demo_cert "$CERT_ALT_NAMES"
|
||||
update_etc_hosts
|
||||
configure_file "/opt/opengnsys/oglog/etc/grafana/grafana.ini" "/etc/grafana/grafana.ini" grafana grafana
|
||||
configure_file "/opt/opengnsys/oglog/etc/grafana/provisioning/datasources/prometheus.yaml" "/etc/grafana/provisioning/datasources/prometheus.yaml" grafana grafana
|
||||
configure_file "/opt/opengnsys/oglog/etc/grafana/provisioning/dashboards/dashboard.yaml" "/etc/grafana/provisioning/dashboards/dashboard.yaml" grafana grafana
|
||||
configure_file "/opt/opengnsys/oglog/etc/grafana/provisioning/alerting/alerts.yaml" "/etc/grafana/provisioning/alerting/alerts.yaml" grafana grafana
|
||||
configure_file "/opt/opengnsys/oglog/etc/grafana/provisioning/alerting/contactpoint.yaml" "/etc/grafana/provisioning/alerting/contactpoint.yaml" grafana grafana
|
||||
configure_file "/opt/opengnsys/oglog/etc/journalbeat/journalbeat.yml" "/etc/journalbeat/journalbeat.yml" root root
|
||||
configure_file "/opt/opengnsys/oglog/etc/opensearch/opensearch.yml" "/etc/opensearch/opensearch.yml" opensearch opensearch
|
||||
configure_file "/opt/opengenys/oglog/etc/prometheus/prometheus.yml" "/etc/prometheus/prometheus.yml" root root
|
||||
configure_file "/opt/opengnsys/oglog/etc/prometheus/web-config.yml" "/etc/prometheus/web-config.yml" root root
|
||||
configure_journal_remote
|
||||
configure_opensearch_certificates
|
||||
configure_journalbeat_certificates
|
||||
configure_grafana
|
||||
configure_prometheus
|
||||
restart_services
|
||||
sleep 5
|
||||
echo "Creating OpenSearch index patterns and initial index..."
|
||||
create_opensearch_index
|
||||
else
|
||||
echo "Upgrading from version $PREV_VERSION."
|
||||
# Perform upgrade actions here if needed
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unknown action: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Automatically added by dh_installdebconf/13.14.1ubuntu5
|
||||
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
db_purge
|
||||
fi
|
||||
# End automatically added section
|
|
@ -0,0 +1,2 @@
|
|||
misc:Depends=debconf (>= 0.5) | debconf-2.0
|
||||
misc:Pre-Depends=
|
|
@ -0,0 +1,30 @@
|
|||
Template: opengnsys/oglog_certificateAltNames
|
||||
Type: string
|
||||
Default: localhost
|
||||
Description: Introduzca los nombres alternativos del certificado de OpenGNSys Log separados por comas
|
||||
|
||||
Template: opengnsys/oglog_opensearchInitialPassword
|
||||
Type: password
|
||||
Default: CorrectHorse_BatteryStaple1
|
||||
Description: Introduzca la contraseña inicial de OpenSearch
|
||||
|
||||
Template: opengnsys/oglog_ogCoreIp
|
||||
Type: string
|
||||
Default: 127.0.0.1
|
||||
Description: Introduzca la IP del servidor OpenGNSys Core
|
||||
|
||||
Template: opengnsys/oglog_ogLogIp
|
||||
Type: string
|
||||
Default: 127.0.0.1
|
||||
Description: Introduzca la IP del servidor OpenGNSys Log
|
||||
|
||||
Template: opengnsys/oglog_subdomain
|
||||
Type: string
|
||||
Default: opengnsys
|
||||
Description: Introduzca el subdominio para OpenGNSys Log
|
||||
|
||||
Template: opengnsys/oglog_nodeExporterTargets
|
||||
Type: string
|
||||
Default: localhost
|
||||
Description: Introduzca los targets de Node Exporter separados por comas
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
filebeat.inputs:
|
||||
- type: log
|
||||
enabled: true
|
||||
paths:
|
||||
- /var/log/opengnsys.log
|
||||
- /home/*/opengnsys.log
|
||||
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 1
|
||||
|
||||
output.elasticsearch:
|
||||
hosts: ["https://oglog-os.${SUBDOMAIN}:9200"]
|
||||
username: "admin"
|
||||
password: "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
|
||||
protocol: "https"
|
||||
ssl.enabled: true
|
||||
ssl.verification_mode: full
|
||||
ssl.certificate: "/etc/filebeat/ogagent-fb.${SUBDOMAIN}.crt.pem"
|
||||
ssl.key: "/etc/filebeat/ogagent-fb.${SUBDOMAIN}.key.pem"
|
||||
|
||||
processors:
|
||||
- add_host_metadata:
|
||||
when.not.contains.tags: forwarded
|
||||
- add_cloud_metadata: ~
|
||||
- add_docker_metadata: ~
|
||||
- add_kubernetes_metadata: ~
|
||||
|
||||
seccomp.enabled: false
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,133 @@
|
|||
apiVersion: 1
|
||||
groups:
|
||||
- orgId: 1
|
||||
name: root-disk-usage-check
|
||||
folder: Node Exporter Alerts
|
||||
interval: 1m
|
||||
rules:
|
||||
- uid: deknkrm5dz400b
|
||||
title: Root FS Used
|
||||
condition: C
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 86400
|
||||
to: 0
|
||||
datasourceUid: PBFA97CFB590B2093
|
||||
model:
|
||||
adhocFilters: []
|
||||
datasource:
|
||||
type: prometheus
|
||||
uid: PBFA97CFB590B2093
|
||||
editorMode: code
|
||||
exemplar: false
|
||||
expr: 100 - ((node_filesystem_avail_bytes{instance="ogserver.opengnsys:9100",job="ogserver",mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{instance="ogserver.opengnsys:9100",job="ogserver",mountpoint="/",fstype!="rootfs"})
|
||||
format: time_series
|
||||
instant: true
|
||||
interval: ""
|
||||
intervalFactor: 1
|
||||
intervalMs: 15000
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
step: 240
|
||||
- refId: C
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 90
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: C
|
||||
type: threshold
|
||||
dashboardUid: rYdddlPWk
|
||||
panelId: 154
|
||||
noDataState: NoData
|
||||
execErrState: Error
|
||||
annotations:
|
||||
__dashboardUid__: rYdddlPWk
|
||||
__panelId__: "154"
|
||||
description: |-
|
||||
Porcentaje de uso actual: ${A.Value}%
|
||||
Punto de montaje: /
|
||||
Job: ${__field.labels.job}
|
||||
summary: 'Alerta: Uso alto del sistema de archivos raíz en ${__field.labels.instance}'
|
||||
isPaused: false
|
||||
notification_settings:
|
||||
receiver: lgromero-email
|
||||
- orgId: 1
|
||||
name: server-host-down
|
||||
folder: Node Exporter Alerts
|
||||
interval: 10s
|
||||
rules:
|
||||
- uid: deknvl4y9svlsb
|
||||
title: Server Down
|
||||
condition: C
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: PBFA97CFB590B2093
|
||||
model:
|
||||
disableTextWrap: false
|
||||
editorMode: builder
|
||||
expr: up{job="ogserver"} == bool 0
|
||||
fullMetaSearch: false
|
||||
includeNullMetadata: true
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
useBackend: false
|
||||
- refId: C
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 1
|
||||
type: lt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: C
|
||||
type: threshold
|
||||
noDataState: NoData
|
||||
execErrState: Error
|
||||
annotations:
|
||||
description: Servidor ogcore caido
|
||||
summary: Servidor ogcore caido
|
||||
isPaused: false
|
||||
notification_settings:
|
||||
receiver: lgromero-email
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: 1
|
||||
contactPoints:
|
||||
- orgId: 1
|
||||
name: email receiver
|
||||
receivers:
|
||||
- uid: "email-receiver-uid"
|
||||
type: email
|
||||
settings:
|
||||
addresses: <example@email.com>
|
||||
disableResolveMessage: false
|
||||
- orgId: 1
|
||||
name: lgromero-email
|
||||
receivers:
|
||||
- uid: ceknjwd00htkwb
|
||||
type: email
|
||||
settings:
|
||||
addresses: lgromero@qindel.com;qindel@opengnsys.es
|
||||
singleEmail: false
|
||||
disableResolveMessage: false
|
|
@ -0,0 +1,8 @@
|
|||
apiVersion: 1
|
||||
providers:
|
||||
- name: 'default'
|
||||
folder: ''
|
||||
type: file
|
||||
options:
|
||||
path: /etc/grafana/dashboards
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Configuración de provisioning de datasource OpenSearch
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: OpenSearch-Opengnsys
|
||||
type: grafana-opensearch-datasource
|
||||
uid: opensearch-ds
|
||||
access: proxy
|
||||
url: https://${OGLOG_SERVER}:9200
|
||||
basicAuth: true
|
||||
basicAuthUser: admin
|
||||
version: 2
|
||||
secureJsonData:
|
||||
basicAuthPassword: ${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
|
||||
jsonData:
|
||||
version: 2.19.2
|
||||
tlsSkipVerify: true
|
||||
serverName: "${OGLOG_SERVER}"
|
||||
timeField: "@timestamp"
|
||||
database: "journalbeat-*"
|
||||
flavor: "OpenSearch"
|
||||
editable: true
|
|
@ -0,0 +1,148 @@
|
|||
[
|
||||
{
|
||||
"id": 1,
|
||||
"uid": "fehoe93yzz20wf",
|
||||
"orgID": 1,
|
||||
"folderUID": "eehoe7oh9bs3kd",
|
||||
"ruleGroup": "grupo-cada-1m",
|
||||
"title": "Subred alta ocupación",
|
||||
"condition": "C",
|
||||
"data": [
|
||||
{
|
||||
"refId": "A",
|
||||
"queryType": "",
|
||||
"relativeTimeRange": {
|
||||
"from": 600,
|
||||
"to": 0
|
||||
},
|
||||
"datasourceUid": "dea978mh1bncwf",
|
||||
"model": {
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"hide": false,
|
||||
"intervalMs": 1000,
|
||||
"maxDataPoints": 43200,
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT\n s.name AS metric,\n ROUND(100 * COUNT(c.id) / (POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2), 2) AS usage_percentage\nFROM subnet s\nLEFT JOIN client c ON c.subnet_id = s.id\nGROUP BY s.id, s.name, s.netmask\nHAVING usage_percentage >= 80;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"queryType": "",
|
||||
"relativeTimeRange": {
|
||||
"from": 0,
|
||||
"to": 0
|
||||
},
|
||||
"datasourceUid": "__expr__",
|
||||
"model": {
|
||||
"conditions": [
|
||||
{
|
||||
"evaluator": {
|
||||
"params": [],
|
||||
"type": "gt"
|
||||
},
|
||||
"operator": {
|
||||
"type": "and"
|
||||
},
|
||||
"query": {
|
||||
"params": [
|
||||
"B"
|
||||
]
|
||||
},
|
||||
"reducer": {
|
||||
"params": [],
|
||||
"type": "last"
|
||||
},
|
||||
"type": "query"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "__expr__",
|
||||
"uid": "__expr__"
|
||||
},
|
||||
"expression": "A",
|
||||
"intervalMs": 1000,
|
||||
"maxDataPoints": 43200,
|
||||
"reducer": "last",
|
||||
"refId": "B",
|
||||
"type": "reduce"
|
||||
}
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"queryType": "",
|
||||
"relativeTimeRange": {
|
||||
"from": 0,
|
||||
"to": 0
|
||||
},
|
||||
"datasourceUid": "__expr__",
|
||||
"model": {
|
||||
"conditions": [
|
||||
{
|
||||
"evaluator": {
|
||||
"params": [
|
||||
80
|
||||
],
|
||||
"type": "gt"
|
||||
},
|
||||
"operator": {
|
||||
"type": "and"
|
||||
},
|
||||
"query": {
|
||||
"params": [
|
||||
"C"
|
||||
]
|
||||
},
|
||||
"reducer": {
|
||||
"params": [],
|
||||
"type": "last"
|
||||
},
|
||||
"type": "query"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "__expr__",
|
||||
"uid": "__expr__"
|
||||
},
|
||||
"expression": "A",
|
||||
"intervalMs": 1000,
|
||||
"maxDataPoints": 43200,
|
||||
"refId": "C",
|
||||
"type": "threshold"
|
||||
}
|
||||
}
|
||||
],
|
||||
"updated": "2025-04-02T07:36:00Z",
|
||||
"noDataState": "NoData",
|
||||
"execErrState": "Error",
|
||||
"for": "1m",
|
||||
"isPaused": false,
|
||||
"notification_settings": {
|
||||
"receiver": "grafana-default-email"
|
||||
},
|
||||
"record": null
|
||||
}
|
||||
]
|
|
@ -0,0 +1,480 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_MYSQL",
|
||||
"label": "mysql",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "mysql",
|
||||
"pluginName": "MySQL"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "barchart",
|
||||
"name": "Bar chart",
|
||||
"version": ""
|
||||
},
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "mysql",
|
||||
"name": "MySQL",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "piechart",
|
||||
"name": "Pie chart",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": []
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"maxPerRow": 8,
|
||||
"options": {
|
||||
"displayLabels": [],
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"pieType": "pie",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "/^total$/",
|
||||
"values": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"repeat": "organizational_unit",
|
||||
"repeatDirection": "h",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "WITH RECURSIVE recursive_units AS (\n SELECT id, name FROM organizational_unit WHERE name IN (${organizational_unit:sqlstring})\n UNION ALL\n SELECT ou.id, ou.name\n FROM organizational_unit ou\n JOIN recursive_units ru ON ou.parent_id = ru.id\n)\n\nSELECT \n ru.name AS organizational_unit,\n client.status,\n COUNT(*) AS total\nFROM \n client\nJOIN \n organizational_unit ou ON client.organizational_unit_id = ou.id\nJOIN \n recursive_units ru ON ou.id = ru.id\nGROUP BY \n ru.name, client.status\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de ordenadores: ${organizational_unit}",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "filterFieldsByName",
|
||||
"options": {
|
||||
"include": {
|
||||
"names": [
|
||||
"total",
|
||||
"organizational_unit",
|
||||
"status"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "piechart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_og_live"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_off"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "super-light-blue",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_windows"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "light-purple",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "normal",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xField": "organizational_unit",
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n organizational_unit.name AS organizational_unit,\n SUM(CASE WHEN client.status = 'off' THEN 1 ELSE 0 END) AS status_off,\n SUM(CASE WHEN client.status = 'windows' THEN 1 ELSE 0 END) AS status_windows,\n SUM(CASE WHEN client.status = 'linux' THEN 1 ELSE 0 END) AS status_linux,\n SUM(CASE WHEN client.status = 'og-live' THEN 1 ELSE 0 END) AS status_og_live\nFROM \n client\nJOIN \n organizational_unit ON client.organizational_unit_id = organizational_unit.id\nGROUP BY \n organizational_unit.name\nORDER BY \n organizational_unit.name;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de equipos por unidad organizativa",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"linux": {
|
||||
"color": "purple",
|
||||
"index": 1
|
||||
},
|
||||
"off": {
|
||||
"color": "super-light-blue",
|
||||
"index": 0
|
||||
},
|
||||
"og-live": {
|
||||
"color": "yellow",
|
||||
"index": 2
|
||||
},
|
||||
"windows": {
|
||||
"color": "blue",
|
||||
"index": 3
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"colorByField": "status",
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT status, COUNT(*) AS count\nFROM client\nGROUP BY status;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"definition": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"description": "",
|
||||
"includeAll": true,
|
||||
"label": "Unidad Organizativa",
|
||||
"multi": true,
|
||||
"name": "organizational_unit",
|
||||
"options": [],
|
||||
"query": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Estado actual de los clientes",
|
||||
"uid": "eeaki78ey6fwgf",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -0,0 +1,185 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "timeseries",
|
||||
"name": "Time series",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Metric",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "count"
|
||||
}
|
||||
],
|
||||
"query": "container.name: \"ogcore-nginx\"",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Numero de peticiones nginx",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Peticiones nginx",
|
||||
"uid": "aeho5mwznhzb4d",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -0,0 +1,458 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_MYSQL",
|
||||
"label": "mysql",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "mysql",
|
||||
"pluginName": "MySQL"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "barchart",
|
||||
"name": "Bar chart",
|
||||
"version": ""
|
||||
},
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "mysql",
|
||||
"name": "MySQL",
|
||||
"version": "11.6.3"
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "in_progress"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "palette-classic"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "success"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "green",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.94,
|
||||
"colorByField": "status",
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"repeat": "organizational_unit",
|
||||
"repeatDirection": "h",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n ou.name AS organizational_unit,\n SUM(CASE WHEN trace.status = 'failed' THEN 1 ELSE 0 END) AS failed,\n SUM(CASE WHEN trace.status = 'in-progress' THEN 1 ELSE 0 END) AS in_progress,\n SUM(CASE WHEN trace.status = 'success' THEN 1 ELSE 0 END) AS success\nFROM trace\nJOIN client ON trace.client_id = client.id\nJOIN organizational_unit ou ON client.organizational_unit_id = ou.id\nWHERE ou.name IN (${organizational_unit:sqlstring})\nGROUP BY ou.name\nORDER BY ou.name;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de comandos: ${organizational_unit}",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n command,\n ROUND(AVG(TIMESTAMPDIFF(SECOND, executed_at, finished_at))) AS avg_seconds\nFROM trace\nWHERE finished_at IS NOT NULL\nGROUP BY command\nORDER BY avg_seconds DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Tiempo de media en segundos de la duración de los comandos",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "light-red",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n command,\n COUNT(*) AS total_failed\nFROM trace\nWHERE status = 'failed'\nGROUP BY command\nORDER BY total_failed DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Número de errores por tipo de comando",
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"definition": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"description": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"includeAll": true,
|
||||
"label": "Unidad Organizativa",
|
||||
"multi": true,
|
||||
"name": "organizational_unit",
|
||||
"options": [],
|
||||
"query": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Traceo y comandos",
|
||||
"uid": "cehkmg691ogsge",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 14,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 1,
|
||||
"fieldMinMax": false,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 1,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "usage_percentage"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "max_ips"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "none"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "assigned_clients"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT\n s.name AS metric, -- Esto Grafana lo usa como \"etiqueta\" por subred\n COUNT(c.id) AS assigned_clients,\n POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2 AS max_ips,\n ROUND(100 * COUNT(c.id) / (POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2), 2) AS usage_percentage\nFROM subnet s\nLEFT JOIN client c ON c.subnet_id = s.id\nGROUP BY s.id, s.name, s.netmask\nORDER BY usage_percentage DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Uso de IPs de subred",
|
||||
"uid": "eehoawvwyk6iof",
|
||||
"version": 2
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
[
|
||||
{
|
||||
"id": 2,
|
||||
"uid": "dea978mh1bncwf",
|
||||
"orgId": 1,
|
||||
"name": "mysql",
|
||||
"type": "mysql",
|
||||
"typeName": "MySQL",
|
||||
"typeLogoUrl": "public/app/plugins/datasource/mysql/img/mysql_logo.svg",
|
||||
"access": "proxy",
|
||||
"url": "__OGCORE_IP__:3306",
|
||||
"user": "root",
|
||||
"secureJsonData": {
|
||||
"password": "root"
|
||||
},
|
||||
"database": "ogcore",
|
||||
"basicAuth": false,
|
||||
"isDefault": false,
|
||||
"jsonData": {
|
||||
"connMaxLifetime": 14400,
|
||||
"database": "ogcore",
|
||||
"maxIdleConns": 100,
|
||||
"maxIdleConnsAuto": true,
|
||||
"maxOpenConns": 100,
|
||||
"tlsSkipVerify": false
|
||||
},
|
||||
"readOnly": false
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"uid": "PBFA97CFB590B2093",
|
||||
"orgId": 1,
|
||||
"name": "Prometheus",
|
||||
"type": "prometheus",
|
||||
"typeName": "Prometheus",
|
||||
"typeLogoUrl": "public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
|
||||
"access": "proxy",
|
||||
"url": "https://oglog-prom.${SUBDOMAIN}:9090",
|
||||
"user": "",
|
||||
"database": "",
|
||||
"basicAuth": false,
|
||||
"isDefault": true,
|
||||
"jsonData": {},
|
||||
"readOnly": true
|
||||
}
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
journalbeat.inputs:
|
||||
- paths:
|
||||
- "/var/log/journal"
|
||||
- "/var/log/journal/remote"
|
||||
seek: cursor
|
||||
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 1
|
||||
|
||||
output.elasticsearch:
|
||||
hosts: ["https://${OGLOG_SERVER}:9200"]
|
||||
username: "admin"
|
||||
password: "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
|
||||
pipeline: "master_pipeline"
|
||||
protocol: "https"
|
||||
ssl.enabled: true
|
||||
ssl.verification_mode: none
|
||||
ssl.certificate: "/etc/journalbeat/certs/server.crt"
|
||||
ssl.key: "/etc/journalbeat/certs/server.key"
|
||||
|
||||
processors:
|
||||
- add_docker_metadata: ~
|
||||
|
||||
seccomp.enabled: false
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
server.host: 0.0.0.0
|
||||
opensearch.hosts: ["https://${OGLOG_SERVER}:9200"]
|
||||
opensearch.username: "admin"
|
||||
opensearch.password: "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
|
||||
server.ssl.enabled: true
|
||||
server.ssl.certificate: /etc/opensearch-dashboards/certs/server.crt
|
||||
server.ssl.key: /etc/opensearch-dashboards/certs/server.key
|
||||
opensearch.ssl.certificate: /etc/opensearch-dashboards/certs/server.crt
|
||||
opensearch.ssl.key: /etc/opensearch-dashboards/certs/server.key
|
||||
opensearch.ssl.verificationMode: none
|
||||
#opensearch.ssl.certificateAuthorities: ["/etc/opensearch-dashboards/certs/server.crt"]
|
||||
opensearch.ssl.alwaysPresentCertificate: false
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{"attributes":{"columns":["agent.name","host.ip","host.mac","message"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30s\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"log.file.path\",\"params\":{\"query\":\"/var/log/opengnsys.log\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"log.file.path\":\"/var/log/opengnsys.log\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"Ogagent","version":1},"id":"06a268e0-d3d0-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-16T06:08:03.537Z","version":"WzQ5LDJd"}
|
||||
{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30s\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"log.file.path\",\"params\":{\"query\":\"/var/log/nginx/ogcore-access.log\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"log.file.path\":\"/var/log/nginx/ogcore-access.log\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"ogcore-nginx","version":1},"id":"0c6388d0-d3d1-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-16T06:13:48.124Z","version":"WzUzLDJd"}
|
||||
{"attributes":{"columns":["agent.name","host.ip","host.mac","message"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30m\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"log.file.path\",\"params\":{\"query\":\"/var/log/opengnsys.log\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"log.file.path\":\"/var/log/opengnsys.log\"}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"agent.name\",\"params\":{\"query\":\"pc-modelo-ubuntu24-2\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"},\"query\":{\"match_phrase\":{\"agent.name\":\"pc-modelo-ubuntu24-2\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"Ogagent - agent name","version":1},"id":"353bcbf0-d7d2-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"},{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-21T08:32:10.797Z","version":"WzU1LDJd"}
|
||||
{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30s\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"Kea Dhcp","version":1},"id":"39976990-d3cf-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__filebeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-16T06:00:44.967Z","version":"WzQzLDJd"}
|
||||
{"attributes":{"columns":["parsed_message.severity","parsed_message.operation","parsed_message.http_code","parsed_message.desc","message"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30s\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"syslog.identifier\",\"params\":{\"query\":\"ogdhcp\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"syslog.identifier\":\"ogdhcp\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"Ogdhcp","version":1},"id":"8542fc60-d249-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__journalbeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"__journalbeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-14T07:33:35.272Z","version":"WzQyLDJd"}
|
||||
{"attributes":{"columns":["parsed_message.severity","parsed_message.method","parsed_message.request_uri","parsed_message.operation","parsed_message.http_code","parsed_message.desc","message"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30s\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":null,\"disabled\":false,\"key\":\"syslog.identifier\",\"negate\":false,\"params\":{\"query\":\"ogboot\"},\"type\":\"phrase\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"syslog.identifier\":\"ogboot\"}}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"Ogboot","version":1},"id":"8b2a50b0-d244-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__journalbeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"__journalbeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-14T07:00:24.803Z","version":"WzM1LDJd"}
|
||||
{"attributes":{"columns":["parsed_json.severity","parsed_json.component","parsed_json.operation","parsed_json.desc"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"highlightAll\":true,\"version\":true,\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"fixed_interval\":\"30s\",\"time_zone\":\"Europe/Madrid\",\"min_doc_count\":1}}},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"syslog.identifier\",\"params\":{\"query\":\"ogcore\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"syslog.identifier\":\"ogcore\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"ogcore-php","version":1},"id":"abe87370-d188-11ef-9b0b-2d28387787cc","migrationVersion":{"search":"7.9.3"},"references":[{"id":"__journalbeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"__journalbeat_index__","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2025-01-13T08:30:40.160Z","version":"WzksMl0="}
|
||||
{"exportedCount":7,"missingRefCount":0,"missingReferences":[]}
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
# WARNING: revise all the lines below before you go into production
|
||||
network.host: 0.0.0.0
|
||||
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/certs/server.key
|
||||
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.ssl.transport.enforce_hostname_verification: false
|
||||
plugins.security.ssl.http.enabled: true
|
||||
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/certs/server.key
|
||||
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.allow_unsafe_democertificates: true
|
||||
plugins.security.allow_default_init_securityindex: true
|
||||
plugins.security.ssl.http.clientauth_mode: OPTIONAL
|
||||
plugins.security.ssl_cert_reload_enabled: true
|
||||
plugins.security.authcz.admin_dn: ['CN=oglog.local']
|
||||
plugins.security.audit.type: internal_opensearch
|
||||
plugins.security.enable_snapshot_restore_privilege: true
|
||||
plugins.security.check_snapshot_restore_write_privileges: true
|
||||
plugins.security.restapi.roles_enabled: [all_access, security_rest_api_access]
|
||||
plugins.security.system_indices.enabled: true
|
||||
plugins.security.system_indices.indices: [.plugins-ml-agent, .plugins-ml-config, .plugins-ml-connector,
|
||||
.plugins-ml-controller, .plugins-ml-model-group, .plugins-ml-model, .plugins-ml-task,
|
||||
.plugins-ml-conversation-meta, .plugins-ml-conversation-interactions, .plugins-ml-memory-meta,
|
||||
.plugins-ml-memory-message, .plugins-ml-stop-words, .opendistro-alerting-config,
|
||||
.opendistro-alerting-alert*, .opendistro-anomaly-results*, .opendistro-anomaly-detector*,
|
||||
.opendistro-anomaly-checkpoints, .opendistro-anomaly-detection-state, .opendistro-reports-*,
|
||||
.opensearch-notifications-*, .opensearch-notebooks, .opensearch-observability, .ql-datasources,
|
||||
.opendistro-asynchronous-search-response*, .replication-metadata-store, .opensearch-knn-models,
|
||||
.geospatial-ip2geo-data*, .plugins-flow-framework-config, .plugins-flow-framework-templates,
|
||||
.plugins-flow-framework-state]
|
||||
node.max_local_storage_nodes: 3
|
||||
discovery.type: single-node
|
||||
compatibility.override_main_response_version: true
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: ogserver
|
||||
static_configs:
|
||||
- targets: ['ogserver.${SUBDOMAIN}:9100']
|
||||
|
||||
- job_name: ogagent
|
||||
static_configs:
|
||||
- targets: ['ogagent.${SUBDOMAIN}:9100']
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
tls_server_config:
|
||||
cert_file: /etc/prometheus/oglog-prom.${SUBDOMAIN}.crt.pem
|
||||
key_file: /etc/prometheus/oglog-prom.${SUBDOMAIN}.key.pem
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
oglog for Debian
|
||||
|
||||
Please edit this to provide information specific to
|
||||
this oglog Debian package.
|
||||
|
||||
(Automatically generated by debmake Version 4.4.0)
|
||||
|
||||
-- vagrant <> Mon, 07 Jul 2025 11:17:41 +0000
|
|
@ -0,0 +1,51 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: oglog
|
||||
Upstream-Contact: <preferred name and address to reach the upstream project>
|
||||
Source: <url://example.com>
|
||||
#
|
||||
# Please double check copyright with the licensecheck(1) command.
|
||||
|
||||
Files: .env
|
||||
README.md
|
||||
etc/filebeat/filebeat.yml
|
||||
etc/grafana/grafana.ini
|
||||
etc/grafana/provisioning/alerting/alerts.yaml
|
||||
etc/grafana/provisioning/alerting/contactpoint.yaml
|
||||
etc/grafana/provisioning/dashboards/dashboard.yaml
|
||||
etc/grafana/provisioning/datasources/opensearch.yaml
|
||||
etc/grafana/provisioning/datasources/prometheus.yaml
|
||||
etc/grafana/resources/alerts/alert-rules.json
|
||||
etc/grafana/resources/dashboards/.json
|
||||
etc/grafana/resources/dashboards/Estado_actual_de_los_clientes.json
|
||||
etc/grafana/resources/dashboards/Node_Exporter_Full.json
|
||||
etc/grafana/resources/dashboards/Peticiones_nginx.json
|
||||
etc/grafana/resources/dashboards/Traceo_y_comandos.json
|
||||
etc/grafana/resources/dashboards/Uso_de_IPs_de_subred.json
|
||||
etc/grafana/resources/dashboards/null.json
|
||||
etc/grafana/resources/datasources/datasources.json
|
||||
etc/journalbeat/journalbeat.yml
|
||||
etc/opensearch-dashboards/opensearch_dashboards.yml
|
||||
etc/opensearch-dashboards/saved_searches.ndjson
|
||||
etc/opensearch/opensearch.yml
|
||||
etc/opensearch/pipelines.json
|
||||
etc/prometheus/prometheus.yml
|
||||
etc/prometheus/web-config.yml
|
||||
poc/Vagrantfile
|
||||
poc/mkcerts.sh
|
||||
script/Documentación script OgLog.md
|
||||
script/agent.sh
|
||||
script/export_grafana.sh
|
||||
script/import_grafana.sh
|
||||
script/journal-upload.sh
|
||||
script/mkcerts.sh
|
||||
script/oglog_installer.sh
|
||||
script/pipeline-bulk.sh
|
||||
script/pipeline-individual.sh
|
||||
script/pipeline.sh
|
||||
script/setup_grafana_token.sh
|
||||
Copyright: __NO_COPYRIGHT_NOR_LICENSE__
|
||||
License: __NO_COPYRIGHT_NOR_LICENSE__
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
|
||||
# license/copyright files.
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/make -f
|
||||
# You must remove unused comment lines for the released package.
|
||||
#export DH_VERBOSE = 1
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
|
||||
|
||||
%:
|
||||
dh $@
|
|
@ -0,0 +1,10 @@
|
|||
# For more information on what jobs are run see:
|
||||
# https://salsa.debian.org/salsa-ci-team/pipeline
|
||||
#
|
||||
# To enable the jobs, go to your repository (at salsa.debian.org)
|
||||
# and click over Settings > CI/CD > Expand (in General pipelines).
|
||||
# In "CI/CD configuration file" write debian/salsa-ci.yml and click
|
||||
# in "Save Changes". The CI tests will run after the next commit.
|
||||
---
|
||||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1,4 @@
|
|||
#
|
||||
# ### gbp-buildpackage(1) user may like this. ###
|
||||
#abort-on-upstream-changes
|
||||
#unapply-patches
|
|
@ -0,0 +1,4 @@
|
|||
#
|
||||
# ### dgit-maint-merge(7) workflow user need this ###
|
||||
# single-debian-patch
|
||||
# auto-commit
|
|
@ -0,0 +1,22 @@
|
|||
The automatically generated patch puts this free form text on top of it.
|
||||
|
||||
If you are using gbp-buildpackage(1), you probably don't need this file.
|
||||
|
||||
If you are using dgit-maint-merge(7), please consider text as follows.
|
||||
|
||||
The Debian packaging of foo is maintained in git, using the merging workflow
|
||||
described in dgit-maint-merge(7). There isn't a patch queue that can be
|
||||
represented as a quilt series.
|
||||
|
||||
A detailed breakdown of the changes is available from their canonical
|
||||
representation - git commits in the packaging repository. For example, to see
|
||||
the changes made by the Debian maintainer in the first upload of upstream
|
||||
version 1.2.3, you could use:
|
||||
|
||||
% git clone https://git.dgit.debian.org/foo
|
||||
% cd foo
|
||||
% git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'
|
||||
|
||||
(If you have dgit, use `dgit clone foo`, rather than plain `git clone`.)
|
||||
|
||||
A single combined diff, containing all the changes, follows.
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# DEP-8: autopkgtest - automatic as-installed package testing
|
||||
# Please check * https://dep-team.pages.debian.net/deps/dep8/
|
||||
# * /usr/share/doc/autopkgtest
|
||||
#
|
||||
# !!! Please make sure to edit this to a valid test, otherwise build will fails
|
||||
#
|
||||
#Tests: testcode.sh
|
||||
#Restrictions: allow-stderr, breaks-testbed, needs-internet, needs-root
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# DEP-12: Per-package machine-readable metadata about Upstream
|
||||
# Please check * https://dep-team.pages.debian.net/deps/dep12/
|
||||
# * https://wiki.debian.org/UpstreamMetadata
|
||||
Reference:
|
||||
Author: <please use full names and separate multiple author by the keyword "and">
|
||||
Title:
|
||||
Journal:
|
||||
Year:
|
||||
Volume:
|
||||
Number:
|
||||
Pages:
|
||||
DOI:
|
||||
PMID:
|
||||
URL:
|
||||
eprint:
|
|
@ -0,0 +1,2 @@
|
|||
# You must remove unused comment lines for the released package.
|
||||
version=3
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,9 @@
|
|||
[server]
|
||||
protocol = https
|
||||
cert_file = /etc/grafana/oglog-graf.${SUBDOMAIN}.crt.pem
|
||||
cert_key = /etc/grafana/oglog-graf.${SUBDOMAIN}.key.pem
|
||||
cert_file = /opt/opengnsys/oglog/etc/certs/server.crt
|
||||
cert_key = /opt/opengnsys/oglog/etc/certs/server.key
|
||||
http_port = 3030
|
||||
|
||||
|
||||
[analytics]
|
||||
reporting_enabled = false
|
||||
|
@ -15,6 +17,14 @@ path = /var/lib/grafana/grafana.db
|
|||
[auth]
|
||||
disable_login_form = false
|
||||
|
||||
[auth.anonymous]
|
||||
enabled = true
|
||||
|
||||
[public_dashboards]
|
||||
enabled = true
|
||||
|
||||
[security]
|
||||
allow_embedding = true
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
enabled = true
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: mysql
|
||||
uid: mysql-ds
|
||||
type: mysql
|
||||
access: proxy
|
||||
url: ${OGCORE_SERVER}:3306
|
||||
user: grafana
|
||||
database: ogcore
|
||||
isDefault: false
|
||||
basicAuth: false
|
||||
readOnly: false
|
||||
jsonData:
|
||||
connMaxLifetime: 14400
|
||||
database: ogcore
|
||||
maxIdleConns: 100
|
||||
maxIdleConnsAuto: true
|
||||
maxOpenConns: 100
|
||||
tlsSkipVerify: false
|
||||
secureJsonData:
|
||||
password: root
|
|
@ -1,27 +1,21 @@
|
|||
# Configuración de provisioning de datasource OpenSearch
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: OpenSearch
|
||||
- name: OpenSearch-Opengnsys
|
||||
type: grafana-opensearch-datasource
|
||||
uid: opensearch-ds
|
||||
access: proxy
|
||||
url: https://oglog-os.${SUBDOMAIN}:9200
|
||||
url: https://${OGLOG_SERVER}:9200
|
||||
basicAuth: true
|
||||
basicAuthUser: admin
|
||||
version: 2
|
||||
secureJsonData:
|
||||
basicAuthPassword: ${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
|
||||
tlsCACert: |
|
||||
${TLS_CA_CERT}
|
||||
tlsClientCert: |
|
||||
${TLS_CLIENT_CERT}
|
||||
tlsClientKey: |
|
||||
${TLS_CLIENT_KEY}
|
||||
jsonData:
|
||||
serverName: "oglog-os.${SUBDOMAIN}"
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
version: 2.19.2
|
||||
tlsSkipVerify: true
|
||||
serverName: "${OGLOG_SERVER}"
|
||||
timeField: "@timestamp"
|
||||
database: "journalbeat-*"
|
||||
flavor: "OpenSearch"
|
||||
version: 2
|
||||
editable: true
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
- name: Prometheus-Opengnsys
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: https://oglog-prom.${SUBDOMAIN}:9090
|
||||
url: http://${OGLOG_SERVER}:9090
|
||||
isDefault: true
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"extra": null,
|
||||
"message": "Expired API key",
|
||||
"messageId": "api-key.expired",
|
||||
"statusCode": 401,
|
||||
"traceID": ""
|
||||
}
|
|
@ -1,485 +1,480 @@
|
|||
{
|
||||
"meta": {
|
||||
"type": "db",
|
||||
"canSave": true,
|
||||
"canEdit": true,
|
||||
"canAdmin": true,
|
||||
"canStar": true,
|
||||
"canDelete": true,
|
||||
"slug": "estado-actual-de-los-clientes",
|
||||
"url": "/d/eeaki78ey6fwgf/estado-actual-de-los-clientes",
|
||||
"expires": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-01-20T14:28:07Z",
|
||||
"updated": "2025-04-14T18:45:57Z",
|
||||
"updatedBy": "Anonymous",
|
||||
"createdBy": "admin",
|
||||
"version": 10,
|
||||
"hasAcl": false,
|
||||
"isFolder": false,
|
||||
"folderId": 0,
|
||||
"folderUid": "",
|
||||
"folderTitle": "General",
|
||||
"folderUrl": "",
|
||||
"provisioned": false,
|
||||
"provisionedExternalId": "",
|
||||
"annotationsPermissions": {
|
||||
"dashboard": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
},
|
||||
"organization": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
}
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_MYSQL",
|
||||
"label": "mysql",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "mysql",
|
||||
"pluginName": "MySQL"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "barchart",
|
||||
"name": "Bar chart",
|
||||
"version": ""
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "mysql",
|
||||
"name": "MySQL",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "piechart",
|
||||
"name": "Pie chart",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": []
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"maxPerRow": 8,
|
||||
"options": {
|
||||
"displayLabels": [],
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"pieType": "pie",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "/^total$/",
|
||||
"values": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"repeat": "organizational_unit",
|
||||
"repeatDirection": "h",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "WITH RECURSIVE recursive_units AS (\n SELECT id, name FROM organizational_unit WHERE name IN (${organizational_unit:sqlstring})\n UNION ALL\n SELECT ou.id, ou.name\n FROM organizational_unit ou\n JOIN recursive_units ru ON ou.parent_id = ru.id\n)\n\nSELECT \n ru.name AS organizational_unit,\n client.status,\n COUNT(*) AS total\nFROM \n client\nJOIN \n organizational_unit ou ON client.organizational_unit_id = ou.id\nJOIN \n recursive_units ru ON ou.id = ru.id\nGROUP BY \n ru.name, client.status\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de ordenadores: ${organizational_unit}",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "filterFieldsByName",
|
||||
"options": {
|
||||
"include": {
|
||||
"names": [
|
||||
"total",
|
||||
"organizational_unit",
|
||||
"status"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "piechart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_og_live"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_off"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "super-light-blue",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_windows"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "light-purple",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "normal",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xField": "organizational_unit",
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n organizational_unit.name AS organizational_unit,\n SUM(CASE WHEN client.status = 'off' THEN 1 ELSE 0 END) AS status_off,\n SUM(CASE WHEN client.status = 'windows' THEN 1 ELSE 0 END) AS status_windows,\n SUM(CASE WHEN client.status = 'linux' THEN 1 ELSE 0 END) AS status_linux,\n SUM(CASE WHEN client.status = 'og-live' THEN 1 ELSE 0 END) AS status_og_live\nFROM \n client\nJOIN \n organizational_unit ON client.organizational_unit_id = organizational_unit.id\nGROUP BY \n organizational_unit.name\nORDER BY \n organizational_unit.name;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de equipos por unidad organizativa",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"linux": {
|
||||
"color": "purple",
|
||||
"index": 1
|
||||
},
|
||||
"off": {
|
||||
"color": "super-light-blue",
|
||||
"index": 0
|
||||
},
|
||||
"og-live": {
|
||||
"color": "yellow",
|
||||
"index": 2
|
||||
},
|
||||
"windows": {
|
||||
"color": "blue",
|
||||
"index": 3
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"colorByField": "status",
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT status, COUNT(*) AS count\nFROM client\nGROUP BY status;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "barchart"
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"schemaVersion": 40,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"text": [
|
||||
"ARQ (Despacho)"
|
||||
],
|
||||
"value": [
|
||||
"ARQ (Despacho)"
|
||||
]
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": []
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"maxPerRow": 8,
|
||||
"options": {
|
||||
"displayLabels": [],
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"pieType": "pie",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "/^total$/",
|
||||
"values": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"repeat": "organizational_unit",
|
||||
"repeatDirection": "h",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"definition": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"description": "",
|
||||
"includeAll": true,
|
||||
"label": "Unidad Organizativa",
|
||||
"multi": true,
|
||||
"name": "organizational_unit",
|
||||
"options": [],
|
||||
"query": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "WITH RECURSIVE recursive_units AS (\n SELECT id, name FROM organizational_unit WHERE name IN (${organizational_unit:sqlstring})\n UNION ALL\n SELECT ou.id, ou.name\n FROM organizational_unit ou\n JOIN recursive_units ru ON ou.parent_id = ru.id\n)\n\nSELECT \n ru.name AS organizational_unit,\n client.status,\n COUNT(*) AS total\nFROM \n client\nJOIN \n organizational_unit ou ON client.organizational_unit_id = ou.id\nJOIN \n recursive_units ru ON ou.id = ru.id\nGROUP BY \n ru.name, client.status\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"title": "Estado de ordenadores: ${organizational_unit}",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "filterFieldsByName",
|
||||
"options": {
|
||||
"include": {
|
||||
"names": [
|
||||
"total",
|
||||
"organizational_unit",
|
||||
"status"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "piechart"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Estado actual de los clientes",
|
||||
"uid": "eeaki78ey6fwgf",
|
||||
"version": 10,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_og_live"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_off"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "super-light-blue",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "status_windows"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "light-purple",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "normal",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xField": "organizational_unit",
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n organizational_unit.name AS organizational_unit,\n SUM(CASE WHEN client.status = 'off' THEN 1 ELSE 0 END) AS status_off,\n SUM(CASE WHEN client.status = 'windows' THEN 1 ELSE 0 END) AS status_windows,\n SUM(CASE WHEN client.status = 'linux' THEN 1 ELSE 0 END) AS status_linux,\n SUM(CASE WHEN client.status = 'og-live' THEN 1 ELSE 0 END) AS status_og_live\nFROM \n client\nJOIN \n organizational_unit ON client.organizational_unit_id = organizational_unit.id\nGROUP BY \n organizational_unit.name\nORDER BY \n organizational_unit.name;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de equipos por unidad organizativa",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"linux": {
|
||||
"color": "purple",
|
||||
"index": 1
|
||||
},
|
||||
"off": {
|
||||
"color": "super-light-blue",
|
||||
"index": 0
|
||||
},
|
||||
"og-live": {
|
||||
"color": "yellow",
|
||||
"index": 2
|
||||
},
|
||||
"windows": {
|
||||
"color": "blue",
|
||||
"index": 3
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"colorByField": "status",
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT status, COUNT(*) AS count\nFROM client\nGROUP BY status;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"definition": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"description": "",
|
||||
"includeAll": true,
|
||||
"label": "Unidad Organizativa",
|
||||
"multi": true,
|
||||
"name": "organizational_unit",
|
||||
"options": [],
|
||||
"query": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Estado actual de los clientes",
|
||||
"uid": "eeaki78ey6fwgf",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,189 +1,185 @@
|
|||
{
|
||||
"meta": {
|
||||
"type": "db",
|
||||
"canSave": true,
|
||||
"canEdit": true,
|
||||
"canAdmin": true,
|
||||
"canStar": true,
|
||||
"canDelete": true,
|
||||
"slug": "peticiones-nginx",
|
||||
"url": "/d/aeho5mwznhzb4d/peticiones-nginx",
|
||||
"expires": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-04-02T05:59:24Z",
|
||||
"updated": "2025-04-14T18:45:57Z",
|
||||
"updatedBy": "Anonymous",
|
||||
"createdBy": "admin",
|
||||
"version": 3,
|
||||
"hasAcl": false,
|
||||
"isFolder": false,
|
||||
"folderId": 0,
|
||||
"folderUid": "",
|
||||
"folderTitle": "General",
|
||||
"folderUrl": "",
|
||||
"provisioned": false,
|
||||
"provisionedExternalId": "",
|
||||
"annotationsPermissions": {
|
||||
"dashboard": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
},
|
||||
"organization": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
}
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 4,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "timeseries",
|
||||
"name": "Time series",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "opensearch-ds"
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "opensearch-ds"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Metric",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "count"
|
||||
}
|
||||
],
|
||||
"query": "container.name: \"ogcore-nginx\"",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Numero de peticiones nginx",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"schemaVersion": 40,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Peticiones nginx",
|
||||
"uid": "aeho5mwznhzb4d",
|
||||
"version": 3,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
"format": "table",
|
||||
"luceneQueryType": "Metric",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "count"
|
||||
}
|
||||
],
|
||||
"query": "container.name: \"ogcore-nginx\"",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Numero de peticiones nginx",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Peticiones nginx",
|
||||
"uid": "aeho5mwznhzb4d",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -1,470 +1,458 @@
|
|||
{
|
||||
"meta": {
|
||||
"type": "db",
|
||||
"canSave": true,
|
||||
"canEdit": true,
|
||||
"canAdmin": true,
|
||||
"canStar": true,
|
||||
"canDelete": true,
|
||||
"slug": "traceo-y-comandos",
|
||||
"url": "/d/cehkmg691ogsge/traceo-y-comandos",
|
||||
"expires": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-04-01T06:13:37Z",
|
||||
"updated": "2025-04-14T18:45:57Z",
|
||||
"updatedBy": "Anonymous",
|
||||
"createdBy": "admin",
|
||||
"version": 13,
|
||||
"hasAcl": false,
|
||||
"isFolder": false,
|
||||
"folderId": 0,
|
||||
"folderUid": "",
|
||||
"folderTitle": "General",
|
||||
"folderUrl": "",
|
||||
"provisioned": false,
|
||||
"provisionedExternalId": "",
|
||||
"annotationsPermissions": {
|
||||
"dashboard": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
},
|
||||
"organization": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
}
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_MYSQL",
|
||||
"label": "mysql",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "mysql",
|
||||
"pluginName": "MySQL"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "barchart",
|
||||
"name": "Bar chart",
|
||||
"version": ""
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 3,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "mysql",
|
||||
"name": "MySQL",
|
||||
"version": "11.6.3"
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "in_progress"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "palette-classic"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "success"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "green",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.94,
|
||||
"colorByField": "status",
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"repeat": "organizational_unit",
|
||||
"repeatDirection": "h",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n ou.name AS organizational_unit,\n SUM(CASE WHEN trace.status = 'failed' THEN 1 ELSE 0 END) AS failed,\n SUM(CASE WHEN trace.status = 'in-progress' THEN 1 ELSE 0 END) AS in_progress,\n SUM(CASE WHEN trace.status = 'success' THEN 1 ELSE 0 END) AS success\nFROM trace\nJOIN client ON trace.client_id = client.id\nJOIN organizational_unit ou ON client.organizational_unit_id = ou.id\nWHERE ou.name IN (${organizational_unit:sqlstring})\nGROUP BY ou.name\nORDER BY ou.name;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Estado de comandos: ${organizational_unit}",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n command,\n ROUND(AVG(TIMESTAMPDIFF(SECOND, executed_at, finished_at))) AS avg_seconds\nFROM trace\nWHERE finished_at IS NOT NULL\nGROUP BY command\nORDER BY avg_seconds DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Tiempo de media en segundos de la duración de los comandos",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "light-red",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n command,\n COUNT(*) AS total_failed\nFROM trace\nWHERE status = 'failed'\nGROUP BY command\nORDER BY total_failed DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Número de errores por tipo de comando",
|
||||
"type": "barchart"
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"schemaVersion": 40,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"text": [
|
||||
"PCs internos"
|
||||
],
|
||||
"value": [
|
||||
"PCs internos"
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "in_progress"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "palette-classic"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "success"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "green",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.94,
|
||||
"colorByField": "status",
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"repeat": "organizational_unit",
|
||||
"repeatDirection": "h",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"definition": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"description": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"includeAll": true,
|
||||
"label": "Unidad Organizativa",
|
||||
"multi": true,
|
||||
"name": "organizational_unit",
|
||||
"options": [],
|
||||
"query": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n ou.name AS organizational_unit,\n SUM(CASE WHEN trace.status = 'failed' THEN 1 ELSE 0 END) AS failed,\n SUM(CASE WHEN trace.status = 'in-progress' THEN 1 ELSE 0 END) AS in_progress,\n SUM(CASE WHEN trace.status = 'success' THEN 1 ELSE 0 END) AS success\nFROM trace\nJOIN client ON trace.client_id = client.id\nJOIN organizational_unit ou ON client.organizational_unit_id = ou.id\nWHERE ou.name IN (${organizational_unit:sqlstring})\nGROUP BY ou.name\nORDER BY ou.name;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"title": "Estado de comandos: ${organizational_unit}",
|
||||
"type": "barchart"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Traceo y comandos",
|
||||
"uid": "cehkmg691ogsge",
|
||||
"version": 13,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n command,\n ROUND(AVG(TIMESTAMPDIFF(SECOND, executed_at, finished_at))) AS avg_seconds\nFROM trace\nWHERE finished_at IS NOT NULL\nGROUP BY command\nORDER BY avg_seconds DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Tiempo de media en segundos de la duración de los comandos",
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "light-red",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT \n command,\n COUNT(*) AS total_failed\nFROM trace\nWHERE status = 'failed'\nGROUP BY command\nORDER BY total_failed DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Número de errores por tipo de comando",
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "${DS_MYSQL}"
|
||||
},
|
||||
"definition": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"description": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"includeAll": true,
|
||||
"label": "Unidad Organizativa",
|
||||
"multi": true,
|
||||
"name": "organizational_unit",
|
||||
"options": [],
|
||||
"query": "SELECT DISTINCT name FROM organizational_unit ORDER BY name",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Traceo y comandos",
|
||||
"uid": "cehkmg691ogsge",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -1,248 +1,213 @@
|
|||
{
|
||||
"meta": {
|
||||
"type": "db",
|
||||
"canSave": true,
|
||||
"canEdit": true,
|
||||
"canAdmin": true,
|
||||
"canStar": true,
|
||||
"canDelete": true,
|
||||
"slug": "uso-de-ips-de-subred",
|
||||
"url": "/d/eehoawvwyk6iof/uso-de-ips-de-subred",
|
||||
"expires": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-04-02T06:58:34Z",
|
||||
"updated": "2025-04-14T18:45:57Z",
|
||||
"updatedBy": "Anonymous",
|
||||
"createdBy": "admin",
|
||||
"version": 3,
|
||||
"hasAcl": false,
|
||||
"isFolder": false,
|
||||
"folderId": 0,
|
||||
"folderUid": "",
|
||||
"folderTitle": "General",
|
||||
"folderUrl": "",
|
||||
"provisioned": false,
|
||||
"provisionedExternalId": "",
|
||||
"annotationsPermissions": {
|
||||
"dashboard": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
},
|
||||
"organization": {
|
||||
"canAdd": true,
|
||||
"canEdit": true,
|
||||
"canDelete": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"panels": [
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 1,
|
||||
"fieldMinMax": false,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 1,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "usage_percentage"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "max_ips"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "none"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "assigned_clients"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT\n s.name AS metric, -- Esto Grafana lo usa como \"etiqueta\" por subred\n COUNT(c.id) AS assigned_clients,\n POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2 AS max_ips,\n ROUND(100 * COUNT(c.id) / (POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2), 2) AS usage_percentage\nFROM subnet s\nLEFT JOIN client c ON c.subnet_id = s.id\nGROUP BY s.id, s.name, s.netmask\nORDER BY usage_percentage DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "barchart"
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"schemaVersion": 40,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Uso de IPs de subred",
|
||||
"uid": "eehoawvwyk6iof",
|
||||
"version": 3,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 14,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 1,
|
||||
"fieldMinMax": false,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 1,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "usage_percentage"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "max_ips"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "none"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "assigned_clients"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"id": "custom.hideFrom",
|
||||
"value": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"barRadius": 0,
|
||||
"barWidth": 0.97,
|
||||
"fullHighlight": false,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
},
|
||||
"xTickLabelRotation": 0,
|
||||
"xTickLabelSpacing": 0
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"dataset": "mysql",
|
||||
"datasource": {
|
||||
"type": "mysql",
|
||||
"uid": "dea978mh1bncwf"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"format": "table",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT\n s.name AS metric, -- Esto Grafana lo usa como \"etiqueta\" por subred\n COUNT(c.id) AS assigned_clients,\n POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2 AS max_ips,\n ROUND(100 * COUNT(c.id) / (POW(2, 32 - BIT_COUNT(INET_ATON(s.netmask))) - 2), 2) AS usage_percentage\nFROM subnet s\nLEFT JOIN client c ON c.subnet_id = s.id\nGROUP BY s.id, s.name, s.netmask\nORDER BY usage_percentage DESC;\n",
|
||||
"refId": "A",
|
||||
"sql": {
|
||||
"columns": [
|
||||
{
|
||||
"parameters": [],
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"groupBy": [
|
||||
{
|
||||
"property": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "groupBy"
|
||||
}
|
||||
],
|
||||
"limit": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Uso de IPs de subred",
|
||||
"uid": "eehoawvwyk6iof",
|
||||
"version": 2
|
||||
}
|
|
@ -0,0 +1,448 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "table",
|
||||
"name": "Table",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "agent.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 121
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1250
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "@timestamp"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 193
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 496
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.os.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 42
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_json"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 359
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 203
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.hostname"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 159
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.ip"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 177
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.mac"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 369
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.job_id"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 240
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.secret"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 217
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 22,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"sortBy": [
|
||||
{
|
||||
"desc": true,
|
||||
"displayName": "@timestamp"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Logs",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "agent.hostname: $hostname AND host.mac: $mac AND agent.type: \"filebeat\"",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"_id": true,
|
||||
"_index": true,
|
||||
"_source": true,
|
||||
"_type": true,
|
||||
"agent.ephemeral_id": true,
|
||||
"agent.hostname": true,
|
||||
"agent.id": true,
|
||||
"agent.name": true,
|
||||
"agent.type": true,
|
||||
"agent.version": true,
|
||||
"data_decoded.agent_version": true,
|
||||
"data_decoded.cfg": true,
|
||||
"data_decoded.exe": true,
|
||||
"data_decoded.ida": true,
|
||||
"data_decoded.idc": true,
|
||||
"data_decoded.ido": true,
|
||||
"data_decoded.iph": true,
|
||||
"data_decoded.job_id": true,
|
||||
"data_decoded.nfl": true,
|
||||
"data_decoded.npc": true,
|
||||
"data_decoded.progress": true,
|
||||
"data_decoded.secret": true,
|
||||
"data_decoded.timestamp": true,
|
||||
"data_decoded.tpc": true,
|
||||
"data_json": true,
|
||||
"ecs.version": true,
|
||||
"host.architecture": true,
|
||||
"host.containerized": true,
|
||||
"host.id": true,
|
||||
"host.name": true,
|
||||
"host.os.codename": true,
|
||||
"host.os.family": true,
|
||||
"host.os.kernel": true,
|
||||
"host.os.name": true,
|
||||
"host.os.platform": true,
|
||||
"host.os.type": true,
|
||||
"host.os.version": true,
|
||||
"input.type": true,
|
||||
"log.file.path": true,
|
||||
"log.offset": true,
|
||||
"message": true,
|
||||
"message_decoded.function": true,
|
||||
"message_decoded.message": false,
|
||||
"message_decoded.threadName": true,
|
||||
"message_decoded.timestamp": true,
|
||||
"message_raw": true
|
||||
},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"@timestamp": 0,
|
||||
"_id": 1,
|
||||
"_index": 2,
|
||||
"_source": 3,
|
||||
"_type": 4,
|
||||
"agent.ephemeral_id": 5,
|
||||
"agent.hostname": 6,
|
||||
"agent.id": 7,
|
||||
"agent.name": 8,
|
||||
"agent.type": 9,
|
||||
"agent.version": 10,
|
||||
"data_decoded.iph": 11,
|
||||
"data_decoded.timestamp": 13,
|
||||
"data_json": 35,
|
||||
"ecs.version": 14,
|
||||
"host.architecture": 15,
|
||||
"host.containerized": 16,
|
||||
"host.hostname": 17,
|
||||
"host.id": 19,
|
||||
"host.ip": 18,
|
||||
"host.mac": 20,
|
||||
"host.name": 21,
|
||||
"host.os.codename": 22,
|
||||
"host.os.family": 23,
|
||||
"host.os.kernel": 24,
|
||||
"host.os.name": 25,
|
||||
"host.os.platform": 26,
|
||||
"host.os.type": 27,
|
||||
"host.os.version": 28,
|
||||
"input.type": 29,
|
||||
"log.file.path": 30,
|
||||
"log.offset": 31,
|
||||
"message": 38,
|
||||
"message_decoded.function": 32,
|
||||
"message_decoded.message": 33,
|
||||
"message_decoded.severity": 12,
|
||||
"message_decoded.threadName": 34,
|
||||
"message_decoded.timestamp": 36,
|
||||
"message_raw": 37
|
||||
},
|
||||
"renameByName": {
|
||||
"agent.type": "",
|
||||
"message_decoded.message": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"definition": "{\"find\": \"terms\", \"field\": \"agent.hostname\"}",
|
||||
"description": "Hostname to select logs",
|
||||
"includeAll": true,
|
||||
"label": "Host",
|
||||
"multi": true,
|
||||
"name": "hostname",
|
||||
"options": [],
|
||||
"query": "{\"find\": \"terms\", \"field\": \"agent.hostname\"}",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"definition": "{\"find\": \"terms\", \"field\": \"host.mac\"}",
|
||||
"includeAll": true,
|
||||
"label": "mac",
|
||||
"multi": true,
|
||||
"name": "mac",
|
||||
"options": [],
|
||||
"query": "{\"find\": \"terms\", \"field\": \"host.mac\"}",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-5m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "filebeat-clients",
|
||||
"uid": "opengnsys-clients",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"extra": null,
|
||||
"message": "Expired API key",
|
||||
"messageId": "api-key.expired",
|
||||
"statusCode": 401,
|
||||
"traceID": ""
|
||||
}
|
|
@ -0,0 +1,554 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "table",
|
||||
"name": "Table",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "agent.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 121
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1250
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "@timestamp"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 193
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 496
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.os.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 42
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_json"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 359
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 203
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.hostname"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 159
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.ip"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 177
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.mac"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 369
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.job_id"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 240
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.secret"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 217
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "description"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1131
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.request_uri"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 577
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "method"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.operation"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 227
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "http_code"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 132
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 93
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 19,
|
||||
"w": 21,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"sortBy": [
|
||||
{
|
||||
"desc": true,
|
||||
"displayName": "@timestamp"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "${DS_OPENSEARCH}"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Logs",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "syslog.identifier: \"ogboot\" AND severity \"INFO\" ",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"_id": true,
|
||||
"_index": true,
|
||||
"_source": true,
|
||||
"_type": true,
|
||||
"agent.ephemeral_id": true,
|
||||
"agent.hostname": true,
|
||||
"agent.id": true,
|
||||
"agent.name": true,
|
||||
"agent.type": true,
|
||||
"agent.version": true,
|
||||
"data_decoded.agent_version": true,
|
||||
"data_decoded.cfg": true,
|
||||
"data_decoded.exe": true,
|
||||
"data_decoded.ida": true,
|
||||
"data_decoded.idc": true,
|
||||
"data_decoded.ido": true,
|
||||
"data_decoded.iph": true,
|
||||
"data_decoded.job_id": true,
|
||||
"data_decoded.nfl": true,
|
||||
"data_decoded.npc": true,
|
||||
"data_decoded.progress": true,
|
||||
"data_decoded.secret": true,
|
||||
"data_decoded.timestamp": true,
|
||||
"data_decoded.tpc": true,
|
||||
"data_json": true,
|
||||
"debug": true,
|
||||
"ecs.version": true,
|
||||
"event.created": true,
|
||||
"event.kind": true,
|
||||
"host.architecture": true,
|
||||
"host.containerized": true,
|
||||
"host.hostname": true,
|
||||
"host.id": true,
|
||||
"host.name": true,
|
||||
"host.os.codename": true,
|
||||
"host.os.family": true,
|
||||
"host.os.kernel": true,
|
||||
"host.os.name": true,
|
||||
"host.os.platform": true,
|
||||
"host.os.type": true,
|
||||
"host.os.version": true,
|
||||
"input.type": true,
|
||||
"journald.custom.runtime_scope": true,
|
||||
"journald.custom.selinux_context": true,
|
||||
"journald.custom.syslog_timestamp": true,
|
||||
"journald.gid": true,
|
||||
"journald.host.boot_id": true,
|
||||
"journald.pid": true,
|
||||
"journald.process.capabilites": true,
|
||||
"journald.process.command_line": true,
|
||||
"journald.process.executable": true,
|
||||
"journald.process.name": true,
|
||||
"journald.uid": true,
|
||||
"log.file.path": true,
|
||||
"log.offset": true,
|
||||
"log.syslog.facility.name": true,
|
||||
"log.syslog.priority": true,
|
||||
"message": true,
|
||||
"message_decoded.function": true,
|
||||
"message_decoded.message": false,
|
||||
"message_decoded.threadName": true,
|
||||
"message_decoded.timestamp": true,
|
||||
"message_raw": true,
|
||||
"parsed_message.component": true,
|
||||
"parsed_message.desc": true,
|
||||
"parsed_message.http_code": true,
|
||||
"parsed_message.method": true,
|
||||
"parsed_message.params.filePath": true,
|
||||
"parsed_message.params.templateCount": true,
|
||||
"parsed_message.params.templateDir": true,
|
||||
"parsed_message.params.templateName": true,
|
||||
"parsed_message.route": true,
|
||||
"parsed_message.route_parameters._controller": true,
|
||||
"parsed_message.route_parameters._route": true,
|
||||
"parsed_message.route_parameters.templateName": true,
|
||||
"process.args": true,
|
||||
"process.args_count": true,
|
||||
"process.command_line": true,
|
||||
"process.pid": true,
|
||||
"processed_message": true,
|
||||
"request_uri": true,
|
||||
"route": true,
|
||||
"route_parameters": true,
|
||||
"syslog.facility": true,
|
||||
"syslog.identifier": true,
|
||||
"syslog.pid": true,
|
||||
"syslog.priority": true,
|
||||
"systemd.cgroup": true,
|
||||
"systemd.invocation_id": true,
|
||||
"systemd.slice": true,
|
||||
"systemd.transport": true,
|
||||
"systemd.unit": true,
|
||||
"user.group.id": true,
|
||||
"user.id": true
|
||||
},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"@timestamp": 0,
|
||||
"_id": 2,
|
||||
"_index": 3,
|
||||
"_source": 4,
|
||||
"_type": 5,
|
||||
"agent.ephemeral_id": 6,
|
||||
"agent.hostname": 7,
|
||||
"agent.id": 8,
|
||||
"agent.name": 9,
|
||||
"agent.type": 10,
|
||||
"agent.version": 11,
|
||||
"debug": 17,
|
||||
"description": 56,
|
||||
"ecs.version": 12,
|
||||
"event.created": 19,
|
||||
"event.kind": 20,
|
||||
"host.hostname": 13,
|
||||
"host.id": 14,
|
||||
"host.name": 15,
|
||||
"http_code": 18,
|
||||
"journald.custom.runtime_scope": 21,
|
||||
"journald.custom.selinux_context": 22,
|
||||
"journald.custom.syslog_timestamp": 23,
|
||||
"journald.gid": 24,
|
||||
"journald.host.boot_id": 25,
|
||||
"journald.pid": 26,
|
||||
"journald.process.capabilites": 27,
|
||||
"journald.process.command_line": 28,
|
||||
"journald.process.executable": 29,
|
||||
"journald.process.name": 30,
|
||||
"journald.uid": 31,
|
||||
"log.syslog.facility.name": 32,
|
||||
"log.syslog.priority": 33,
|
||||
"message": 16,
|
||||
"parsed_message.component": 34,
|
||||
"parsed_message.desc": 35,
|
||||
"parsed_message.http_code": 36,
|
||||
"parsed_message.operation": 37,
|
||||
"parsed_message.params.templateCount": 38,
|
||||
"parsed_message.params.templateDir": 39,
|
||||
"parsed_message.params.templateName": 40,
|
||||
"parsed_message.severity": 1,
|
||||
"process.args": 41,
|
||||
"process.args_count": 42,
|
||||
"process.command_line": 43,
|
||||
"process.pid": 44,
|
||||
"processed_message": 45,
|
||||
"syslog.facility": 46,
|
||||
"syslog.identifier": 47,
|
||||
"syslog.pid": 48,
|
||||
"syslog.priority": 49,
|
||||
"systemd.cgroup": 50,
|
||||
"systemd.invocation_id": 51,
|
||||
"systemd.slice": 52,
|
||||
"systemd.transport": 53,
|
||||
"systemd.unit": 54,
|
||||
"user.group.id": 55,
|
||||
"user.id": 57
|
||||
},
|
||||
"renameByName": {
|
||||
"@timestamp": "Fecha",
|
||||
"agent.type": "",
|
||||
"description": "Description",
|
||||
"http_code": "HTTP Code",
|
||||
"message_decoded.message": "",
|
||||
"parsed_message.operation": "Operation",
|
||||
"parsed_message.severity": "Log level"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-5m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "ogboot-logs",
|
||||
"uid": "ogboot-logs",
|
||||
"version": 7,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -0,0 +1,527 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "table",
|
||||
"name": "Table",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "agent.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 121
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1250
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "@timestamp"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 193
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1725
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.os.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 42
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_json"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 359
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 203
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.hostname"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 159
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.ip"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 177
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.mac"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 369
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.job_id"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 240
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.secret"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 217
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.desc"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1266
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "fecha"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 427
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Nivel de log"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 115
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 22,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "${DS_OPENSEARCH}"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Logs",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "syslog.identifier:\"ogcore\" AND (parsed_message.severity:\"INFO\" OR parsed_message.severity:\"WARNING\" OR parsed_message.severity:\"ERROR\")",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"_id": true,
|
||||
"_index": true,
|
||||
"_source": true,
|
||||
"_type": true,
|
||||
"agent.ephemeral_id": true,
|
||||
"agent.hostname": true,
|
||||
"agent.id": true,
|
||||
"agent.name": true,
|
||||
"agent.type": true,
|
||||
"agent.version": true,
|
||||
"data_decoded.agent_version": true,
|
||||
"data_decoded.cfg": true,
|
||||
"data_decoded.exe": true,
|
||||
"data_decoded.ida": true,
|
||||
"data_decoded.idc": true,
|
||||
"data_decoded.ido": true,
|
||||
"data_decoded.iph": true,
|
||||
"data_decoded.job_id": true,
|
||||
"data_decoded.nfl": true,
|
||||
"data_decoded.npc": true,
|
||||
"data_decoded.progress": true,
|
||||
"data_decoded.secret": true,
|
||||
"data_decoded.timestamp": true,
|
||||
"data_decoded.tpc": true,
|
||||
"data_json": true,
|
||||
"debug": true,
|
||||
"ecs.version": true,
|
||||
"event.created": true,
|
||||
"event.kind": true,
|
||||
"host.architecture": true,
|
||||
"host.containerized": true,
|
||||
"host.hostname": true,
|
||||
"host.id": true,
|
||||
"host.ip": true,
|
||||
"host.mac": true,
|
||||
"host.name": true,
|
||||
"host.os.codename": true,
|
||||
"host.os.family": true,
|
||||
"host.os.kernel": true,
|
||||
"host.os.name": true,
|
||||
"host.os.platform": true,
|
||||
"host.os.type": true,
|
||||
"host.os.version": true,
|
||||
"input.type": true,
|
||||
"journald.audit.login_uid": true,
|
||||
"journald.audit.session": true,
|
||||
"journald.custom.runtime_scope": true,
|
||||
"journald.custom.selinux_context": true,
|
||||
"journald.custom.syslog_raw": true,
|
||||
"journald.custom.syslog_timestamp": true,
|
||||
"journald.gid": true,
|
||||
"journald.host.boot_id": true,
|
||||
"journald.pid": true,
|
||||
"journald.process.capabilites": true,
|
||||
"journald.process.command_line": true,
|
||||
"journald.process.executable": true,
|
||||
"journald.process.name": true,
|
||||
"journald.uid": true,
|
||||
"log.file.path": true,
|
||||
"log.offset": true,
|
||||
"log.syslog.facility.name": true,
|
||||
"log.syslog.priority": true,
|
||||
"message": true,
|
||||
"message_decoded.function": true,
|
||||
"message_decoded.in_oglive": true,
|
||||
"message_decoded.message": false,
|
||||
"message_decoded.threadName": true,
|
||||
"message_decoded.timestamp": true,
|
||||
"message_raw": true,
|
||||
"parsed_message": true,
|
||||
"parsed_message.component": true,
|
||||
"parsed_message.datetime": true,
|
||||
"parsed_message.desc": false,
|
||||
"parsed_message.operation": true,
|
||||
"parsed_message.params": true,
|
||||
"parsed_message.params.cache-adapter": true,
|
||||
"parsed_message.params.exception": true,
|
||||
"parsed_message.params.iph": true,
|
||||
"parsed_message.params.key": true,
|
||||
"parsed_message.params.method": true,
|
||||
"parsed_message.params.request_uri": true,
|
||||
"parsed_message.params.route": true,
|
||||
"parsed_message.params.route_parameters._controller": true,
|
||||
"parsed_message.params.route_parameters._route": true,
|
||||
"parsed_message.params.timestamp": true,
|
||||
"parsed_message.severity": false,
|
||||
"process.args": true,
|
||||
"process.args_count": true,
|
||||
"process.command_line": true,
|
||||
"process.pid": true,
|
||||
"syslog.facility": true,
|
||||
"syslog.identifier": true,
|
||||
"syslog.pid": true,
|
||||
"syslog.priority": true,
|
||||
"systemd.cgroup": true,
|
||||
"systemd.invocation_id": true,
|
||||
"systemd.slice": true,
|
||||
"systemd.transport": true,
|
||||
"systemd.unit": true,
|
||||
"user.group.id": true,
|
||||
"user.id": true
|
||||
},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"@timestamp": 0,
|
||||
"_id": 1,
|
||||
"_index": 2,
|
||||
"_source": 3,
|
||||
"_type": 4,
|
||||
"agent.ephemeral_id": 5,
|
||||
"agent.hostname": 6,
|
||||
"agent.id": 7,
|
||||
"agent.name": 8,
|
||||
"agent.type": 9,
|
||||
"agent.version": 10,
|
||||
"debug": 16,
|
||||
"ecs.version": 11,
|
||||
"event.created": 17,
|
||||
"event.kind": 18,
|
||||
"host.hostname": 12,
|
||||
"host.id": 13,
|
||||
"host.name": 14,
|
||||
"journald.audit.login_uid": 19,
|
||||
"journald.audit.session": 20,
|
||||
"journald.custom.runtime_scope": 21,
|
||||
"journald.custom.selinux_context": 22,
|
||||
"journald.custom.syslog_timestamp": 23,
|
||||
"journald.gid": 24,
|
||||
"journald.host.boot_id": 25,
|
||||
"journald.pid": 26,
|
||||
"journald.process.capabilites": 27,
|
||||
"journald.process.command_line": 28,
|
||||
"journald.process.executable": 29,
|
||||
"journald.process.name": 30,
|
||||
"journald.uid": 31,
|
||||
"log.syslog.facility.name": 32,
|
||||
"log.syslog.priority": 33,
|
||||
"message": 15,
|
||||
"parsed_message.component": 34,
|
||||
"parsed_message.datetime": 35,
|
||||
"parsed_message.desc": 38,
|
||||
"parsed_message.operation": 37,
|
||||
"parsed_message.params": 39,
|
||||
"parsed_message.params.cache-adapter": 40,
|
||||
"parsed_message.params.exception": 41,
|
||||
"parsed_message.params.iph": 42,
|
||||
"parsed_message.params.key": 43,
|
||||
"parsed_message.params.method": 44,
|
||||
"parsed_message.params.request_uri": 45,
|
||||
"parsed_message.params.route": 46,
|
||||
"parsed_message.params.route_parameters._controller": 47,
|
||||
"parsed_message.params.route_parameters._route": 48,
|
||||
"parsed_message.params.timestamp": 49,
|
||||
"parsed_message.severity": 36,
|
||||
"process.args": 50,
|
||||
"process.args_count": 51,
|
||||
"process.command_line": 52,
|
||||
"process.pid": 53,
|
||||
"syslog.facility": 54,
|
||||
"syslog.identifier": 55,
|
||||
"syslog.pid": 56,
|
||||
"syslog.priority": 57,
|
||||
"systemd.cgroup": 58,
|
||||
"systemd.invocation_id": 59,
|
||||
"systemd.slice": 60,
|
||||
"systemd.transport": 61,
|
||||
"systemd.unit": 62,
|
||||
"user.group.id": 63,
|
||||
"user.id": 64
|
||||
},
|
||||
"renameByName": {
|
||||
"@timestamp": "Fecha",
|
||||
"agent.type": "",
|
||||
"message_decoded.message": "message",
|
||||
"message_decoded.severity": "log level",
|
||||
"parsed_message.desc": "Descripción",
|
||||
"parsed_message.operation": "",
|
||||
"parsed_message.severity": "Nivel de log"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-5m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "ogcore-logs",
|
||||
"uid": "ogcore-logs",
|
||||
"version": 4,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -0,0 +1,562 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "table",
|
||||
"name": "Table",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "agent.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 121
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1250
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "@timestamp"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 193
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 496
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.os.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 42
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_json"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 359
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 203
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.hostname"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 159
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.ip"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 177
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.mac"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 369
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.job_id"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 240
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.secret"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 217
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "description"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1131
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.request_uri"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 577
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "method"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.operation"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 227
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "http_code"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 132
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 93
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "log level"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 107
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 19,
|
||||
"w": 21,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "${DS_OPENSEARCH}"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Logs",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "syslog.identifier: \"ogdhcp\" AND severity \"INFO\" ",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"_id": true,
|
||||
"_index": true,
|
||||
"_source": true,
|
||||
"_type": true,
|
||||
"agent.ephemeral_id": true,
|
||||
"agent.hostname": true,
|
||||
"agent.id": true,
|
||||
"agent.name": true,
|
||||
"agent.type": true,
|
||||
"agent.version": true,
|
||||
"data_decoded.agent_version": true,
|
||||
"data_decoded.cfg": true,
|
||||
"data_decoded.exe": true,
|
||||
"data_decoded.ida": true,
|
||||
"data_decoded.idc": true,
|
||||
"data_decoded.ido": true,
|
||||
"data_decoded.iph": true,
|
||||
"data_decoded.job_id": true,
|
||||
"data_decoded.nfl": true,
|
||||
"data_decoded.npc": true,
|
||||
"data_decoded.progress": true,
|
||||
"data_decoded.secret": true,
|
||||
"data_decoded.timestamp": true,
|
||||
"data_decoded.tpc": true,
|
||||
"data_json": true,
|
||||
"debug": true,
|
||||
"ecs.version": true,
|
||||
"event.created": true,
|
||||
"event.kind": true,
|
||||
"host.architecture": true,
|
||||
"host.containerized": true,
|
||||
"host.hostname": true,
|
||||
"host.id": true,
|
||||
"host.name": true,
|
||||
"host.os.codename": true,
|
||||
"host.os.family": true,
|
||||
"host.os.kernel": true,
|
||||
"host.os.name": true,
|
||||
"host.os.platform": true,
|
||||
"host.os.type": true,
|
||||
"host.os.version": true,
|
||||
"input.type": true,
|
||||
"journald.custom.runtime_scope": true,
|
||||
"journald.custom.selinux_context": true,
|
||||
"journald.custom.syslog_timestamp": true,
|
||||
"journald.gid": true,
|
||||
"journald.host.boot_id": true,
|
||||
"journald.pid": true,
|
||||
"journald.process.capabilites": true,
|
||||
"journald.process.command_line": true,
|
||||
"journald.process.executable": true,
|
||||
"journald.process.name": true,
|
||||
"journald.uid": true,
|
||||
"log.file.path": true,
|
||||
"log.offset": true,
|
||||
"log.syslog.facility.name": true,
|
||||
"log.syslog.priority": true,
|
||||
"message": true,
|
||||
"message_decoded.function": true,
|
||||
"message_decoded.message": false,
|
||||
"message_decoded.threadName": true,
|
||||
"message_decoded.timestamp": true,
|
||||
"message_raw": true,
|
||||
"parsed_message.component": true,
|
||||
"parsed_message.desc": true,
|
||||
"parsed_message.http_code": true,
|
||||
"parsed_message.method": true,
|
||||
"parsed_message.params": true,
|
||||
"parsed_message.params.filePath": true,
|
||||
"parsed_message.params.subnets_count": true,
|
||||
"parsed_message.params.templateCount": true,
|
||||
"parsed_message.params.templateDir": true,
|
||||
"parsed_message.params.templateName": true,
|
||||
"parsed_message.route": true,
|
||||
"parsed_message.route_parameters._controller": true,
|
||||
"parsed_message.route_parameters._route": true,
|
||||
"parsed_message.route_parameters.templateName": true,
|
||||
"process.args": true,
|
||||
"process.args_count": true,
|
||||
"process.command_line": true,
|
||||
"process.pid": true,
|
||||
"processed_message": true,
|
||||
"request_uri": true,
|
||||
"route": true,
|
||||
"route_parameters": true,
|
||||
"syslog.facility": true,
|
||||
"syslog.identifier": true,
|
||||
"syslog.pid": true,
|
||||
"syslog.priority": true,
|
||||
"systemd.cgroup": true,
|
||||
"systemd.invocation_id": true,
|
||||
"systemd.slice": true,
|
||||
"systemd.transport": true,
|
||||
"systemd.unit": true,
|
||||
"user.group.id": true,
|
||||
"user.id": true
|
||||
},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"@timestamp": 0,
|
||||
"_id": 2,
|
||||
"_index": 3,
|
||||
"_source": 4,
|
||||
"_type": 5,
|
||||
"agent.ephemeral_id": 6,
|
||||
"agent.hostname": 7,
|
||||
"agent.id": 8,
|
||||
"agent.name": 9,
|
||||
"agent.type": 10,
|
||||
"agent.version": 11,
|
||||
"debug": 17,
|
||||
"description": 56,
|
||||
"ecs.version": 12,
|
||||
"event.created": 19,
|
||||
"event.kind": 20,
|
||||
"host.hostname": 13,
|
||||
"host.id": 14,
|
||||
"host.name": 15,
|
||||
"http_code": 18,
|
||||
"journald.custom.runtime_scope": 21,
|
||||
"journald.custom.selinux_context": 22,
|
||||
"journald.custom.syslog_timestamp": 23,
|
||||
"journald.gid": 24,
|
||||
"journald.host.boot_id": 25,
|
||||
"journald.pid": 26,
|
||||
"journald.process.capabilites": 27,
|
||||
"journald.process.command_line": 28,
|
||||
"journald.process.executable": 29,
|
||||
"journald.process.name": 30,
|
||||
"journald.uid": 31,
|
||||
"log.syslog.facility.name": 32,
|
||||
"log.syslog.priority": 33,
|
||||
"message": 16,
|
||||
"parsed_message.component": 34,
|
||||
"parsed_message.desc": 35,
|
||||
"parsed_message.http_code": 36,
|
||||
"parsed_message.operation": 37,
|
||||
"parsed_message.params.templateCount": 38,
|
||||
"parsed_message.params.templateDir": 39,
|
||||
"parsed_message.params.templateName": 40,
|
||||
"parsed_message.severity": 1,
|
||||
"process.args": 41,
|
||||
"process.args_count": 42,
|
||||
"process.command_line": 43,
|
||||
"process.pid": 44,
|
||||
"processed_message": 45,
|
||||
"syslog.facility": 46,
|
||||
"syslog.identifier": 47,
|
||||
"syslog.pid": 48,
|
||||
"syslog.priority": 49,
|
||||
"systemd.cgroup": 50,
|
||||
"systemd.invocation_id": 51,
|
||||
"systemd.slice": 52,
|
||||
"systemd.transport": 53,
|
||||
"systemd.unit": 54,
|
||||
"user.group.id": 55,
|
||||
"user.id": 57
|
||||
},
|
||||
"renameByName": {
|
||||
"@timestamp": "fecha",
|
||||
"agent.type": "",
|
||||
"message_decoded.message": "",
|
||||
"parsed_message.operation": "operation",
|
||||
"parsed_message.severity": "log level"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-5m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "ogdhcp-logs",
|
||||
"uid": "ogdhcp-logs",
|
||||
"version": 3,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -0,0 +1,593 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_OPENSEARCH",
|
||||
"label": "OpenSearch",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "grafana-opensearch-datasource",
|
||||
"pluginName": "OpenSearch"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "11.6.3"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "grafana-opensearch-datasource",
|
||||
"name": "OpenSearch",
|
||||
"version": "2.27.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "table",
|
||||
"name": "Table",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "OpenSearch-Opengnsys"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "agent.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 121
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1250
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "@timestamp"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 193
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 496
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.os.type"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 42
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_json"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 359
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "message_decoded.severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 203
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.hostname"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 159
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.ip"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 177
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "host.mac"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 369
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.job_id"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 240
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "data_decoded.secret"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 217
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "description"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 1131
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.request_uri"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 577
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "method"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "parsed_message.operation"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 227
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "http_code"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 132
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "severity"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 93
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "log level"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 107
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "operation"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 338
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 19,
|
||||
"w": 21,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "11.6.3",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto"
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "${DS_OPENSEARCH}"
|
||||
},
|
||||
"format": "table",
|
||||
"luceneQueryType": "Logs",
|
||||
"metrics": [
|
||||
{
|
||||
"id": "1",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "syslog.identifier: \"ogrepo-api\" AND host.hostname: $hostname",
|
||||
"queryType": "lucene",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"_id": true,
|
||||
"_index": true,
|
||||
"_source": true,
|
||||
"_type": true,
|
||||
"agent.ephemeral_id": true,
|
||||
"agent.hostname": true,
|
||||
"agent.id": true,
|
||||
"agent.name": true,
|
||||
"agent.type": true,
|
||||
"agent.version": true,
|
||||
"data_decoded.agent_version": true,
|
||||
"data_decoded.cfg": true,
|
||||
"data_decoded.exe": true,
|
||||
"data_decoded.ida": true,
|
||||
"data_decoded.idc": true,
|
||||
"data_decoded.ido": true,
|
||||
"data_decoded.iph": true,
|
||||
"data_decoded.job_id": true,
|
||||
"data_decoded.nfl": true,
|
||||
"data_decoded.npc": true,
|
||||
"data_decoded.progress": true,
|
||||
"data_decoded.secret": true,
|
||||
"data_decoded.timestamp": true,
|
||||
"data_decoded.tpc": true,
|
||||
"data_json": true,
|
||||
"debug": true,
|
||||
"debug_message": true,
|
||||
"ecs.version": true,
|
||||
"event.created": true,
|
||||
"event.kind": true,
|
||||
"host.architecture": true,
|
||||
"host.containerized": true,
|
||||
"host.hostname": true,
|
||||
"host.id": true,
|
||||
"host.name": true,
|
||||
"host.os.codename": true,
|
||||
"host.os.family": true,
|
||||
"host.os.kernel": true,
|
||||
"host.os.name": true,
|
||||
"host.os.platform": true,
|
||||
"host.os.type": true,
|
||||
"host.os.version": true,
|
||||
"input.type": true,
|
||||
"journald.code.file": true,
|
||||
"journald.code.func": true,
|
||||
"journald.code.line": true,
|
||||
"journald.custom.runtime_scope": true,
|
||||
"journald.custom.selinux_context": true,
|
||||
"journald.custom.syslog_timestamp": true,
|
||||
"journald.gid": true,
|
||||
"journald.host.boot_id": true,
|
||||
"journald.pid": true,
|
||||
"journald.process.capabilites": true,
|
||||
"journald.process.command_line": true,
|
||||
"journald.process.executable": true,
|
||||
"journald.process.name": true,
|
||||
"journald.uid": true,
|
||||
"log.file.path": true,
|
||||
"log.offset": true,
|
||||
"log.syslog.facility.name": true,
|
||||
"log.syslog.priority": true,
|
||||
"message": true,
|
||||
"message_decoded.function": true,
|
||||
"message_decoded.message": false,
|
||||
"message_decoded.threadName": true,
|
||||
"message_decoded.timestamp": true,
|
||||
"message_raw": true,
|
||||
"parsed_json.component": true,
|
||||
"parsed_message.component": true,
|
||||
"parsed_message.desc": true,
|
||||
"parsed_message.http_code": true,
|
||||
"parsed_message.method": true,
|
||||
"parsed_message.params": true,
|
||||
"parsed_message.params.filePath": true,
|
||||
"parsed_message.params.subnets_count": true,
|
||||
"parsed_message.params.templateCount": true,
|
||||
"parsed_message.params.templateDir": true,
|
||||
"parsed_message.params.templateName": true,
|
||||
"parsed_message.route": true,
|
||||
"parsed_message.route_parameters._controller": true,
|
||||
"parsed_message.route_parameters._route": true,
|
||||
"parsed_message.route_parameters.templateName": true,
|
||||
"process.args": true,
|
||||
"process.args_count": true,
|
||||
"process.command_line": true,
|
||||
"process.pid": true,
|
||||
"processed_message": true,
|
||||
"request_uri": true,
|
||||
"route": true,
|
||||
"route_parameters": true,
|
||||
"syslog.facility": true,
|
||||
"syslog.identifier": true,
|
||||
"syslog.pid": true,
|
||||
"syslog.priority": true,
|
||||
"systemd.cgroup": true,
|
||||
"systemd.invocation_id": true,
|
||||
"systemd.slice": true,
|
||||
"systemd.transport": true,
|
||||
"systemd.unit": true,
|
||||
"user.group.id": true,
|
||||
"user.id": true
|
||||
},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"@timestamp": 0,
|
||||
"_id": 1,
|
||||
"_index": 2,
|
||||
"_source": 4,
|
||||
"_type": 5,
|
||||
"agent.ephemeral_id": 6,
|
||||
"agent.hostname": 7,
|
||||
"agent.id": 8,
|
||||
"agent.name": 9,
|
||||
"agent.type": 10,
|
||||
"agent.version": 11,
|
||||
"debug_message": 42,
|
||||
"ecs.version": 12,
|
||||
"event.created": 16,
|
||||
"event.kind": 17,
|
||||
"host.hostname": 13,
|
||||
"host.id": 14,
|
||||
"host.name": 15,
|
||||
"journald.code.file": 43,
|
||||
"journald.code.func": 44,
|
||||
"journald.code.line": 45,
|
||||
"journald.custom.runtime_scope": 18,
|
||||
"journald.custom.selinux_context": 19,
|
||||
"journald.gid": 20,
|
||||
"journald.host.boot_id": 21,
|
||||
"journald.pid": 22,
|
||||
"journald.process.capabilites": 23,
|
||||
"journald.process.command_line": 24,
|
||||
"journald.process.executable": 25,
|
||||
"journald.process.name": 26,
|
||||
"journald.uid": 27,
|
||||
"log.syslog.priority": 28,
|
||||
"parsed_json.component": 47,
|
||||
"parsed_json.desc": 49,
|
||||
"parsed_json.http_code": 46,
|
||||
"parsed_json.operation": 48,
|
||||
"parsed_json.severity": 3,
|
||||
"process.args": 29,
|
||||
"process.args_count": 30,
|
||||
"process.command_line": 31,
|
||||
"process.pid": 32,
|
||||
"syslog.identifier": 33,
|
||||
"syslog.priority": 34,
|
||||
"systemd.cgroup": 35,
|
||||
"systemd.invocation_id": 36,
|
||||
"systemd.slice": 37,
|
||||
"systemd.transport": 38,
|
||||
"systemd.unit": 39,
|
||||
"user.group.id": 40,
|
||||
"user.id": 41
|
||||
},
|
||||
"renameByName": {
|
||||
"@timestamp": "fecha",
|
||||
"agent.type": "",
|
||||
"message_decoded.message": "",
|
||||
"parsed_json.desc": "description",
|
||||
"parsed_json.http_code": "http_code",
|
||||
"parsed_json.operation": "operation",
|
||||
"parsed_json.severity": "log level",
|
||||
"parsed_message.operation": "operation",
|
||||
"parsed_message.severity": "log level"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 41,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "grafana-opensearch-datasource",
|
||||
"uid": "${DS_OPENSEARCH}"
|
||||
},
|
||||
"definition": "{\"find\": \"terms\", \"field\": \"host.hostname\", \"query\": \"syslog.identifier:\\\"ogrepo-api\\\"\"}\n",
|
||||
"includeAll": true,
|
||||
"label": "Host",
|
||||
"multi": true,
|
||||
"name": "hostname",
|
||||
"options": [],
|
||||
"query": "{\"find\": \"terms\", \"field\": \"host.hostname\", \"query\": \"syslog.identifier:\\\"ogrepo-api\\\"\"}\n",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "ogrepo-logs",
|
||||
"uid": "ogrepo-logs",
|
||||
"version": 4,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -8,15 +8,15 @@ setup.template.settings:
|
|||
index.number_of_shards: 1
|
||||
|
||||
output.elasticsearch:
|
||||
hosts: ["https://oglog-os.${SUBDOMAIN}:9200"]
|
||||
hosts: ["https://${OGLOG_SERVER}:9200"]
|
||||
username: "admin"
|
||||
password: "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
|
||||
pipeline: "master_pipeline"
|
||||
protocol: "https"
|
||||
ssl.enabled: true
|
||||
ssl.verification_mode: full
|
||||
ssl.certificate: "/etc/journalbeat/oglog-jb.${SUBDOMAIN}.crt.pem"
|
||||
ssl.key: "/etc/journalbeat/oglog-jb.${SUBDOMAIN}.key.pem"
|
||||
ssl.verification_mode: none
|
||||
ssl.certificate: "/etc/journalbeat/certs/server.crt"
|
||||
ssl.key: "/etc/journalbeat/certs/server.key"
|
||||
|
||||
processors:
|
||||
- add_docker_metadata: ~
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
server.host: 0.0.0.0
|
||||
opensearch.hosts: ["https://oglog-os.${SUBDOMAIN}:9200"]
|
||||
opensearch.hosts: ["https://${OGLOG_SERVER}:9200"]
|
||||
opensearch.username: "admin"
|
||||
opensearch.password: "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
|
||||
server.ssl.enabled: true
|
||||
server.ssl.certificate: /etc/opensearch-dashboards/oglog-osdb.${SUBDOMAIN}.crt.pem
|
||||
server.ssl.key: /etc/opensearch-dashboards/oglog-osdb.${SUBDOMAIN}.key.pem
|
||||
opensearch.ssl.certificate: /etc/opensearch-dashboards/oglog-osdb.${SUBDOMAIN}.crt.pem
|
||||
opensearch.ssl.key: /etc/opensearch-dashboards/oglog-osdb.${SUBDOMAIN}.key.pem
|
||||
opensearch.ssl.verificationMode: full
|
||||
opensearch.ssl.certificateAuthorities: ["/etc/ssl/certs/ca.crt.pem"]
|
||||
opensearch.ssl.alwaysPresentCertificate: true
|
||||
server.ssl.certificate: /etc/opensearch-dashboards/certs/server.crt
|
||||
server.ssl.key: /etc/opensearch-dashboards/certs/server.key
|
||||
opensearch.ssl.certificate: /etc/opensearch-dashboards/certs/server.crt
|
||||
opensearch.ssl.key: /etc/opensearch-dashboards/certs/server.key
|
||||
opensearch.ssl.verificationMode: none
|
||||
#opensearch.ssl.certificateAuthorities: ["/etc/opensearch-dashboards/certs/server.crt"]
|
||||
opensearch.ssl.alwaysPresentCertificate: false
|
||||
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
# WARNING: revise all the lines below before you go into production
|
||||
network.host: "${OGLOG_IP}"
|
||||
plugins.security.ssl.transport.pemcert_filepath: esnode.pem
|
||||
plugins.security.ssl.transport.pemkey_filepath: esnode-key.pem
|
||||
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
|
||||
network.host: 0.0.0.0
|
||||
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/certs/server.key
|
||||
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.ssl.transport.enforce_hostname_verification: false
|
||||
plugins.security.ssl.http.enabled: true
|
||||
plugins.security.ssl.http.pemcert_filepath: oglog-os.${SUBDOMAIN}.crt.pem
|
||||
plugins.security.ssl.http.pemkey_filepath: oglog-os.${SUBDOMAIN}.key.pem
|
||||
plugins.security.ssl.http.pemtrustedcas_filepath: ca.crt.pem
|
||||
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/certs/server.key
|
||||
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/certs/server.crt
|
||||
plugins.security.allow_unsafe_democertificates: true
|
||||
plugins.security.allow_default_init_securityindex: true
|
||||
plugins.security.authcz.admin_dn: ['CN=kirk,OU=client,O=client,L=test,C=de']
|
||||
plugins.security.ssl.http.clientauth_mode: OPTIONAL
|
||||
plugins.security.ssl_cert_reload_enabled: true
|
||||
plugins.security.authcz.admin_dn: ['CN=oglog.local']
|
||||
plugins.security.audit.type: internal_opensearch
|
||||
plugins.security.enable_snapshot_restore_privilege: true
|
||||
plugins.security.check_snapshot_restore_write_privileges: true
|
||||
|
@ -29,6 +31,5 @@ plugins.security.system_indices.indices: [.plugins-ml-agent, .plugins-ml-config,
|
|||
node.max_local_storage_nodes: 3
|
||||
discovery.type: single-node
|
||||
compatibility.override_main_response_version: true
|
||||
plugins.security.ssl.http.clientauth_mode: REQUIRE
|
||||
plugins.security.ssl_cert_reload_enabled: true
|
||||
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
|
||||
"master_pipeline" : {
|
||||
"description" : "Master pipeline to route logs based on syslog.identifier",
|
||||
"processors" : [
|
||||
|
@ -141,7 +142,7 @@
|
|||
"set" : {
|
||||
"field" : "debug",
|
||||
"value" : "No matching pipeline, skipping further processing.",
|
||||
"if" : "ctx.syslog?.identifier != 'in.tftpd' && ctx.syslog?.identifier != 'ogboot' && ctx.syslog?.identifier != 'kea-dhcp4' && ctx.syslog?.identifier != 'ogrepo-api' && ctx.syslog?.identifier != 'docker'"
|
||||
"if" : "ctx.syslog?.identifier != 'in.tftpd' && ctx.syslog?.identifier != 'ogboot' && ctx.syslog?.identifier != 'kea-dhcp4' && ctx.syslog?.identifier != 'ogrepo-api' && ctx.syslog?.identifier != 'ogcore' && ctx.syslog?.identifier != 'docker'"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -18,7 +18,7 @@ API_TOKEN=$(cat "$TOKEN_FILE")
|
|||
if [ -f "$RESOURCE_DIR/datasources/datasources.json" ]; then
|
||||
echo "Importando datasources..."
|
||||
jq -c '.[]' "$RESOURCE_DIR/datasources/datasources.json" | while read -r datasource; do
|
||||
curl -s -X POST "$GRAFANA_URL/api/datasources" \
|
||||
curl -k -X POST "$GRAFANA_URL/api/datasources" \
|
||||
-H "Authorization: Bearer $API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$datasource" > /dev/null
|
||||
|
@ -32,7 +32,7 @@ for f in "$RESOURCE_DIR/dashboards"/*.json; do
|
|||
echo "Importando $(basename "$f")"
|
||||
|
||||
jq 'del(.dashboard.id) | {dashboard: .dashboard, overwrite: true}' "$f" | \
|
||||
curl -s -X POST "$GRAFANA_URL/api/dashboards/db" \
|
||||
curl -k -X POST "$GRAFANA_URL/api/dashboards/db" \
|
||||
-H "Authorization: Bearer $API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data-binary @-
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
# Variables
|
||||
#GRAFANA_URL="https://oglog-graf.mytld:3000"
|
||||
GRAFANA_URL=$1
|
||||
GRAFANA_USER="admin"
|
||||
GRAFANA_PASS="admin"
|
||||
GRAFANA_PASS="qindel"
|
||||
#CERT="/etc/grafana/oglog-graf.mytld.crt.pem"
|
||||
CERT=$2
|
||||
#KEY="/etc/grafana/oglog-graf.mytld.key.pem"
|
||||
|
@ -15,14 +16,14 @@ TOKEN_TTL=3600
|
|||
TOKEN_FILE="./grafana_token.txt"
|
||||
|
||||
# 1. Buscar si ya existe el Service Account
|
||||
SA_ID=$(curl -s --cert "$CERT" --key "$KEY" -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
SA_ID=$(curl -k -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
"$GRAFANA_URL/api/serviceaccounts/search" \
|
||||
| jq -r '.serviceAccounts[] | select(.name=="'"$SA_NAME"'") | .id')
|
||||
|
||||
# 2. Crear si no existe
|
||||
if [ -z "$SA_ID" ]; then
|
||||
echo "Creando Service Account: $SA_NAME"
|
||||
SA_ID=$(curl -s --cert "$CERT" --key "$KEY" -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
SA_ID=$(curl -k -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{ "name": "'"$SA_NAME"'", "role": "Admin" }' \
|
||||
"$GRAFANA_URL/api/serviceaccounts" | jq -r '.id')
|
||||
|
@ -38,18 +39,18 @@ if [ -f "$TOKEN_FILE" ]; then
|
|||
else
|
||||
echo "Buscando token existente con nombre $TOKEN_NAME..."
|
||||
|
||||
TOKEN_ID=$(curl -s --cert "$CERT" --key "$KEY" -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
TOKEN_ID=$(curl -k -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
"$GRAFANA_URL/api/serviceaccounts/$SA_ID/tokens" \
|
||||
| jq -r '.[] | select(.name=="'"$TOKEN_NAME"'") | .id')
|
||||
|
||||
if [ -n "$TOKEN_ID" ]; then
|
||||
echo "Borrando token anterior con ID $TOKEN_ID..."
|
||||
curl -s -X DELETE --cert "$CERT" --key "$KEY" -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
curl -k -X DELETE -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
"$GRAFANA_URL/api/serviceaccounts/$SA_ID/tokens/$TOKEN_ID" > /dev/null
|
||||
fi
|
||||
|
||||
echo "Creando nuevo token..."
|
||||
TOKEN=$(curl -s --cert "$CERT" --key "$KEY" -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
TOKEN=$(curl -k -u $GRAFANA_USER:$GRAFANA_PASS \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{ "name": "'"$TOKEN_NAME"'", "secondsToLive": '"$TOKEN_TTL"' }' \
|
||||
"$GRAFANA_URL/api/serviceaccounts/$SA_ID/tokens" | jq -r '.key')
|
||||
|
|
Loading…
Reference in New Issue