Initial commit: add .gitignore and README
This commit is contained in:
151
monitoring/metrics-dashboard/grafana-dashboard.json
Normal file
151
monitoring/metrics-dashboard/grafana-dashboard.json
Normal file
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"dashboard": {
|
||||
"title": "Integration & Streamlining Success Metrics",
|
||||
"tags": ["metrics", "success", "integration"],
|
||||
"timezone": "browser",
|
||||
"panels": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "Infrastructure Cost Reduction",
|
||||
"type": "stat",
|
||||
"targets": [
|
||||
{
|
||||
"expr": "infrastructure_cost_reduction_percent",
|
||||
"legendFormat": "Cost Reduction"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"thresholds": {
|
||||
"steps": [
|
||||
{ "value": 0, "color": "red" },
|
||||
{ "value": 30, "color": "yellow" },
|
||||
{ "value": 40, "color": "green" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "Shared Infrastructure Adoption",
|
||||
"type": "stat",
|
||||
"targets": [
|
||||
{
|
||||
"expr": "shared_infrastructure_adoption_percent",
|
||||
"legendFormat": "Adoption"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"thresholds": {
|
||||
"steps": [
|
||||
{ "value": 0, "color": "red" },
|
||||
{ "value": 60, "color": "yellow" },
|
||||
{ "value": 80, "color": "green" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "Shared Packages Usage",
|
||||
"type": "stat",
|
||||
"targets": [
|
||||
{
|
||||
"expr": "shared_packages_count",
|
||||
"legendFormat": "Packages"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short",
|
||||
"thresholds": {
|
||||
"steps": [
|
||||
{ "value": 0, "color": "red" },
|
||||
{ "value": 7, "color": "yellow" },
|
||||
{ "value": 10, "color": "green" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "Deployment Time Reduction",
|
||||
"type": "stat",
|
||||
"targets": [
|
||||
{
|
||||
"expr": "deployment_time_reduction_percent",
|
||||
"legendFormat": "Time Reduction"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"thresholds": {
|
||||
"steps": [
|
||||
{ "value": 0, "color": "red" },
|
||||
{ "value": 30, "color": "yellow" },
|
||||
{ "value": 50, "color": "green" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "CI/CD Adoption",
|
||||
"type": "stat",
|
||||
"targets": [
|
||||
{
|
||||
"expr": "cicd_adoption_percent",
|
||||
"legendFormat": "Adoption"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"thresholds": {
|
||||
"steps": [
|
||||
{ "value": 0, "color": "red" },
|
||||
{ "value": 70, "color": "yellow" },
|
||||
{ "value": 90, "color": "green" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"title": "Service Uptime",
|
||||
"type": "stat",
|
||||
"targets": [
|
||||
{
|
||||
"expr": "service_uptime_percent",
|
||||
"legendFormat": "Uptime"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"thresholds": {
|
||||
"steps": [
|
||||
{ "value": 0, "color": "red" },
|
||||
{ "value": 99, "color": "yellow" },
|
||||
{ "value": 99.9, "color": "green" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 27,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
|
||||
32
monitoring/metrics-dashboard/setup.sh
Executable file
32
monitoring/metrics-dashboard/setup.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Setup metrics dashboard in Grafana
|
||||
|
||||
set -e
|
||||
|
||||
NAMESPACE="monitoring"
|
||||
DASHBOARD_FILE="grafana-dashboard.json"
|
||||
|
||||
echo "📊 Setting up Metrics Dashboard in Grafana..."
|
||||
|
||||
# Check if Grafana is accessible
|
||||
if ! kubectl get svc -n "$NAMESPACE" | grep -q grafana; then
|
||||
echo "⚠️ Grafana not found in namespace $NAMESPACE"
|
||||
echo " → Deploy Grafana first: cd ../prometheus && ./install.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create ConfigMap with dashboard
|
||||
echo "📝 Creating dashboard ConfigMap..."
|
||||
kubectl create configmap metrics-dashboard \
|
||||
--from-file=dashboard.json="$DASHBOARD_FILE" \
|
||||
-n "$NAMESPACE" \
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
|
||||
echo "✅ Metrics dashboard configured!"
|
||||
echo ""
|
||||
echo "📝 Next steps:"
|
||||
echo " 1. Access Grafana: kubectl port-forward -n $NAMESPACE svc/prometheus-grafana 3000:80"
|
||||
echo " 2. Import dashboard from ConfigMap"
|
||||
echo " 3. Configure data sources"
|
||||
echo " 4. Set up metrics collection"
|
||||
|
||||
Reference in New Issue
Block a user