This commit is contained in:
148
src/templates/prod.json
Normal file
148
src/templates/prod.json
Normal file
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"name": "prod",
|
||||
"displayName": "Production Monitoring",
|
||||
"description": "Production environment monitoring and management layout",
|
||||
"variables": [
|
||||
{
|
||||
"name": "ENVIRONMENT",
|
||||
"description": "Production environment name",
|
||||
"defaultValue": "production",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "SERVER_HOST",
|
||||
"description": "Server hostname",
|
||||
"defaultValue": "prod.example.com",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "SSH_USER",
|
||||
"description": "SSH username",
|
||||
"defaultValue": "admin",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"layout": {
|
||||
"version": "1.0.0",
|
||||
"terminalType": "tmux",
|
||||
"createdAt": "2024-01-01T00:00:00.000Z",
|
||||
"updatedAt": "2024-01-01T00:00:00.000Z",
|
||||
"session": {
|
||||
"id": "s-prod",
|
||||
"name": "prod",
|
||||
"windows": [
|
||||
{
|
||||
"id": "w0",
|
||||
"index": 0,
|
||||
"name": "monitoring",
|
||||
"panes": [
|
||||
{
|
||||
"id": "p0",
|
||||
"index": 0,
|
||||
"layout": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 50,
|
||||
"height": 24
|
||||
},
|
||||
"command": "ssh ${SSH_USER}@${SERVER_HOST} 'htop'",
|
||||
"cwd": "~",
|
||||
"title": "System Load"
|
||||
},
|
||||
{
|
||||
"id": "p1",
|
||||
"index": 1,
|
||||
"layout": {
|
||||
"x": 50,
|
||||
"y": 0,
|
||||
"width": 50,
|
||||
"height": 24
|
||||
},
|
||||
"command": "ssh ${SSH_USER}@${SERVER_HOST} 'docker stats --no-stream'",
|
||||
"cwd": "~",
|
||||
"title": "Docker Stats"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "w1",
|
||||
"index": 1,
|
||||
"name": "logs",
|
||||
"panes": [
|
||||
{
|
||||
"id": "p0",
|
||||
"index": 0,
|
||||
"layout": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 100,
|
||||
"height": 24
|
||||
},
|
||||
"command": "ssh ${SSH_USER}@${SERVER_HOST} 'tail -f /var/log/nginx/access.log'",
|
||||
"cwd": "~",
|
||||
"title": "Nginx Logs"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "w2",
|
||||
"index": 2,
|
||||
"name": "deploy",
|
||||
"panes": [
|
||||
{
|
||||
"id": "p0",
|
||||
"index": 0,
|
||||
"layout": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 50,
|
||||
"height": 24
|
||||
},
|
||||
"command": "ssh ${SSH_USER}@${SERVER_HOST} 'cd /opt/${ENVIRONMENT} && git pull'",
|
||||
"cwd": "~",
|
||||
"title": "Git Pull"
|
||||
},
|
||||
{
|
||||
"id": "p1",
|
||||
"index": 1,
|
||||
"layout": {
|
||||
"x": 50,
|
||||
"y": 0,
|
||||
"width": 50,
|
||||
"height": 24
|
||||
},
|
||||
"command": "ssh ${SSH_USER}@${SERVER_HOST} 'pm2 restart all'",
|
||||
"cwd": "~",
|
||||
"title": "PM2 Restart"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "w3",
|
||||
"index": 3,
|
||||
"name": "emergency",
|
||||
"panes": [
|
||||
{
|
||||
"id": "p0",
|
||||
"index": 0,
|
||||
"layout": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 100,
|
||||
"height": 24
|
||||
},
|
||||
"command": "ssh ${SSH_USER}@${SERVER_HOST}",
|
||||
"cwd": "~",
|
||||
"title": "SSH Connection"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"activeWindowIndex": 0
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Production monitoring setup",
|
||||
"tags": ["production", "monitoring", "ops"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user