Skip to content

Commit

Permalink
Added postgresql rules
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-benedito committed Oct 28, 2023
1 parent bc1bf46 commit 5055e0c
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rules/controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ps"
],
"path": "",
"query": "awx, nginx, redis, receptor"
"query": "awx, nginx, redis, receptor, postgresql"
},
"Supervisor": {
"files": [
Expand Down
78 changes: 78 additions & 0 deletions rules/pg-node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"PG Version": {
"files": [
"PG_VERSION"
],
"path": "var/lib/pgsql/data",
"query": ""
},
"PG hba Config": {
"files": [
"pg_hba.conf"
],
"path": "var/lib/pgsql/data",
"query": ""
},
"PG full config": {
"files": [
"postgresql.conf"
],
"path": "var/lib/pgsql/data",
"query": ""
},
"PG Logs": {
"files": [
"postgresql-Sun.log",
"postgresql-Mon.log",
"postgresql-Tue.log",
"postgresql-Wed.log",
"postgresql-Thu.log",
"postgresql-Fri.log",
"postgresql-Sat.log"
],
"path": "var/lib/pgsql/data/pg_log",
"query": "error, fatal, read-only"
},
"Filesystem": {
"files": [
"df"
],
"path": "",
"query": "100%"
},
"noexec": {
"files": [
"mount"
],
"path": "",
"query": "noexec"
},
"OOM": {
"files": [
"dmesg"
],
"path": "sos_commands/kernel/",
"query": "OOM"
},
"Antivirus": {
"files": [
"installed-rpms"
],
"path": "",
"query": "falcon, crowd"
},
"Installed Packages": {
"files": [
"installed-rpms"
],
"path": "",
"query": "ansible, automation, tower, postgres"
},
"Running Processes": {
"files": [
"ps"
],
"path": "",
"query": "awx, nginx, redis, postgres"
}
}
34 changes: 34 additions & 0 deletions rules/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,39 @@
],
"path": "sos_commands/python",
"query": "ansible"
},
"PG logs": {
"files": [
"postgresql-Sun.log",
"postgresql-Mon.log",
"postgresql-Tue.log",
"postgresql-Wed.log",
"postgresql-Thu.log",
"postgresql-Fri.log",
"postgresql-Sat.log"
],
"path": "var/lib/pgsql/data/pg_log",
"query": "error, fatal, read-only"
},
"PG Version": {
"files": [
"PG_VERSION"
],
"path": "var/lib/pgsql/data",
"query": ""
},
"PG hba Config": {
"files": [
"pg_hba.conf"
],
"path": "var/lib/pgsql/data",
"query": ""
},
"PG full config": {
"files": [
"postgresql.conf"
],
"path": "var/lib/pgsql/data",
"query": ""
}
}
6 changes: 2 additions & 4 deletions rules/tower.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ps"
],
"path": "",
"query": "awx, nginx, redis"
"query": "awx, nginx, redis, postgresql"
},
"Supervisor": {
"files": [
Expand All @@ -90,9 +90,7 @@
"Nginx": {
"files": [
"error.log",
"access.log",
"automationcontroller.error.log",
"automationcontroller.access.log"
"access.log"
],
"path": "var/log/nginx",
"query": "error, 504, denied"
Expand Down

0 comments on commit 5055e0c

Please sign in to comment.