|
| 1 | +{ |
| 2 | + "title": "Asterisk Overview", |
| 3 | + "uid": "asterisk-overview", |
| 4 | + "tags": ["voip", "asterisk", "pbx", "sip"], |
| 5 | + "refresh": "30s", |
| 6 | + "time": { |
| 7 | + "from": "now-1h", |
| 8 | + "to": "now" |
| 9 | + }, |
| 10 | + "panels": [ |
| 11 | + { |
| 12 | + "title": "Asterisk VM Status", |
| 13 | + "type": "stat", |
| 14 | + "gridPos": {"h": 4, "w": 6, "x": 0, "y": 0}, |
| 15 | + "targets": [ |
| 16 | + { |
| 17 | + "expr": "up{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 18 | + "legendFormat": "pbx-1", |
| 19 | + "refId": "A" |
| 20 | + } |
| 21 | + ], |
| 22 | + "fieldConfig": { |
| 23 | + "defaults": { |
| 24 | + "mappings": [{"type": "value", "options": {"0": {"text": "DOWN", "color": "red"}, "1": {"text": "UP", "color": "green"}}}], |
| 25 | + "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": 0}, {"color": "green", "value": 1}]} |
| 26 | + } |
| 27 | + }, |
| 28 | + "options": {"colorMode": "background", "graphMode": "none"}, |
| 29 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 30 | + }, |
| 31 | + { |
| 32 | + "title": "Asterisk Info", |
| 33 | + "type": "text", |
| 34 | + "gridPos": {"h": 4, "w": 18, "x": 6, "y": 0}, |
| 35 | + "options": { |
| 36 | + "mode": "markdown", |
| 37 | + "content": "## Asterisk PBX (pbx-1)\n\n**Role:** Call processing, voicemail, IVR, recording\n\n| Port | Protocol | Purpose |\n|------|----------|--------|\n| 5080 | UDP | SIP (internal) |\n| 5038 | TCP | AMI (Asterisk Manager Interface) |\n| 8088 | TCP | ARI (Asterisk REST Interface) |\n\n*Note: Asterisk-specific metrics require asterisk_exporter to be installed*" |
| 38 | + } |
| 39 | + }, |
| 40 | + { |
| 41 | + "title": "CPU Usage", |
| 42 | + "type": "timeseries", |
| 43 | + "gridPos": {"h": 8, "w": 12, "x": 0, "y": 4}, |
| 44 | + "targets": [ |
| 45 | + { |
| 46 | + "expr": "100 - (avg(irate(node_cpu_seconds_total{job=\"voip-nodes\", instance=\"pbx-1\", mode=\"idle\"}[5m])) * 100)", |
| 47 | + "legendFormat": "CPU %", |
| 48 | + "refId": "A" |
| 49 | + } |
| 50 | + ], |
| 51 | + "fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}}, |
| 52 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 53 | + }, |
| 54 | + { |
| 55 | + "title": "Memory Usage", |
| 56 | + "type": "timeseries", |
| 57 | + "gridPos": {"h": 8, "w": 12, "x": 12, "y": 4}, |
| 58 | + "targets": [ |
| 59 | + { |
| 60 | + "expr": "node_memory_MemTotal_bytes{job=\"voip-nodes\", instance=\"pbx-1\"} - node_memory_MemAvailable_bytes{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 61 | + "legendFormat": "Used", |
| 62 | + "refId": "A" |
| 63 | + }, |
| 64 | + { |
| 65 | + "expr": "node_memory_MemAvailable_bytes{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 66 | + "legendFormat": "Available", |
| 67 | + "refId": "B" |
| 68 | + } |
| 69 | + ], |
| 70 | + "fieldConfig": {"defaults": {"unit": "bytes"}}, |
| 71 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 72 | + }, |
| 73 | + { |
| 74 | + "title": "Network I/O", |
| 75 | + "type": "timeseries", |
| 76 | + "gridPos": {"h": 8, "w": 12, "x": 0, "y": 12}, |
| 77 | + "targets": [ |
| 78 | + { |
| 79 | + "expr": "rate(node_network_receive_bytes_total{job=\"voip-nodes\", instance=\"pbx-1\", device=\"lima0\"}[5m])", |
| 80 | + "legendFormat": "RX", |
| 81 | + "refId": "A" |
| 82 | + }, |
| 83 | + { |
| 84 | + "expr": "rate(node_network_transmit_bytes_total{job=\"voip-nodes\", instance=\"pbx-1\", device=\"lima0\"}[5m])", |
| 85 | + "legendFormat": "TX", |
| 86 | + "refId": "B" |
| 87 | + } |
| 88 | + ], |
| 89 | + "fieldConfig": {"defaults": {"unit": "Bps"}}, |
| 90 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 91 | + }, |
| 92 | + { |
| 93 | + "title": "Disk I/O (Recording Storage)", |
| 94 | + "type": "timeseries", |
| 95 | + "gridPos": {"h": 8, "w": 12, "x": 12, "y": 12}, |
| 96 | + "targets": [ |
| 97 | + { |
| 98 | + "expr": "rate(node_disk_read_bytes_total{job=\"voip-nodes\", instance=\"pbx-1\"}[5m])", |
| 99 | + "legendFormat": "Read", |
| 100 | + "refId": "A" |
| 101 | + }, |
| 102 | + { |
| 103 | + "expr": "rate(node_disk_written_bytes_total{job=\"voip-nodes\", instance=\"pbx-1\"}[5m])", |
| 104 | + "legendFormat": "Write", |
| 105 | + "refId": "B" |
| 106 | + } |
| 107 | + ], |
| 108 | + "fieldConfig": {"defaults": {"unit": "Bps"}}, |
| 109 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 110 | + }, |
| 111 | + { |
| 112 | + "title": "Disk Usage", |
| 113 | + "type": "gauge", |
| 114 | + "gridPos": {"h": 6, "w": 8, "x": 0, "y": 20}, |
| 115 | + "targets": [ |
| 116 | + { |
| 117 | + "expr": "(1 - (node_filesystem_avail_bytes{job=\"voip-nodes\", instance=\"pbx-1\", mountpoint=\"/\"} / node_filesystem_size_bytes{job=\"voip-nodes\", instance=\"pbx-1\", mountpoint=\"/\"})) * 100", |
| 118 | + "legendFormat": "Root", |
| 119 | + "refId": "A" |
| 120 | + } |
| 121 | + ], |
| 122 | + "fieldConfig": { |
| 123 | + "defaults": { |
| 124 | + "unit": "percent", |
| 125 | + "min": 0, |
| 126 | + "max": 100, |
| 127 | + "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": 0}, {"color": "yellow", "value": 70}, {"color": "red", "value": 85}]} |
| 128 | + } |
| 129 | + }, |
| 130 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 131 | + }, |
| 132 | + { |
| 133 | + "title": "Process Count", |
| 134 | + "type": "stat", |
| 135 | + "gridPos": {"h": 6, "w": 8, "x": 8, "y": 20}, |
| 136 | + "targets": [ |
| 137 | + { |
| 138 | + "expr": "node_procs_running{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 139 | + "legendFormat": "Running", |
| 140 | + "refId": "A" |
| 141 | + }, |
| 142 | + { |
| 143 | + "expr": "node_procs_blocked{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 144 | + "legendFormat": "Blocked", |
| 145 | + "refId": "B" |
| 146 | + } |
| 147 | + ], |
| 148 | + "options": {"colorMode": "value", "graphMode": "area"}, |
| 149 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 150 | + }, |
| 151 | + { |
| 152 | + "title": "File Descriptors", |
| 153 | + "type": "timeseries", |
| 154 | + "gridPos": {"h": 6, "w": 8, "x": 16, "y": 20}, |
| 155 | + "targets": [ |
| 156 | + { |
| 157 | + "expr": "node_filefd_allocated{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 158 | + "legendFormat": "Allocated", |
| 159 | + "refId": "A" |
| 160 | + }, |
| 161 | + { |
| 162 | + "expr": "node_filefd_maximum{job=\"voip-nodes\", instance=\"pbx-1\"}", |
| 163 | + "legendFormat": "Maximum", |
| 164 | + "refId": "B" |
| 165 | + } |
| 166 | + ], |
| 167 | + "datasource": {"type": "prometheus", "uid": "Prometheus"} |
| 168 | + } |
| 169 | + ] |
| 170 | +} |
0 commit comments