Skip to content

Commit fb8cefb

Browse files
committed
feature: set new color scheme
1 parent 66ccd09 commit fb8cefb

25 files changed

+141
-114
lines changed

mamonsu/lib/zbx_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ZbxTemplate(object):
9191

9292
graph_items_defaults = [
9393
('sortorder', None), ('drawtype', 0),
94-
('color', '578159'), ('yaxisside', 0),
94+
('color', '00CC00'), ('yaxisside', 0),
9595
('calc_fnc', 2), ('type', Template.GRAPH_TYPE.normal)
9696
]
9797

mamonsu/plugins/pgsql/archive_command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class ArchiveCommand(Plugin):
5757
key = "pgsql.archive_command{0}"
5858
Items = [
5959
# key, desc, color, side, graph, delta, units
60-
("count_files_to_archive", "Files in archive_status Need to Archive Count", "9C8A4E", 0, 1, Plugin.DELTA.as_is, Plugin.UNITS.none),
60+
("count_files_to_archive", "Files in archive_status Need to Archive Count", "006AAE", 0, 1, Plugin.DELTA.as_is, Plugin.UNITS.none),
6161
("size_files_to_archive", "Files Need to Archive Size", "793F5D", 0, 0, Plugin.DELTA.as_is, Plugin.UNITS.bytes),
62-
("archived_files", "Archived Files Count", "578159", 0, 1, Plugin.DELTA.simple_change, Plugin.UNITS.none),
63-
("failed_trying_to_archive", "Attempts to Archive Files Count", "E57862", 0, 1, Plugin.DELTA.simple_change, Plugin.UNITS.none),
62+
("archived_files", "Archived Files Count", "00CC00", 0, 1, Plugin.DELTA.simple_change, Plugin.UNITS.none),
63+
("failed_trying_to_archive", "Attempts to Archive Files Count", "FF5656", 0, 1, Plugin.DELTA.simple_change, Plugin.UNITS.none),
6464
]
6565
old_archived_count = None
6666
old_failed_count = None

mamonsu/plugins/pgsql/bgwriter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,32 @@ class BgWriter(Plugin):
1818

1919
("buffers_checkpoint", "bgwriter[buffers_checkpoint]",
2020
"Buffers Written During Checkpoints",
21-
("PostgreSQL bgwriter", "793F5D", 1),
21+
("PostgreSQL bgwriter", "006AAE", 1),
2222
Plugin.DELTA.simple_change),
2323

2424
("buffers_clean", "bgwriter[buffers_clean]",
2525
"Buffers Written",
26-
("PostgreSQL bgwriter", "9C8A4E", 1),
26+
("PostgreSQL bgwriter", "00CC00", 1),
2727
Plugin.DELTA.simple_change),
2828

2929
("maxwritten_clean", "bgwriter[maxwritten_clean]",
3030
"Number of bgwriter Stopped by Max Write Count",
31-
("PostgreSQL bgwriter", "00B0B8", 0),
31+
("PostgreSQL bgwriter", "FF5656", 0),
3232
Plugin.DELTA.simple_change),
3333

3434
("buffers_backend", "bgwriter[buffers_backend]",
3535
"Buffers Written Directly by a Backend",
36-
("PostgreSQL bgwriter", "7EB29B", 1),
36+
("PostgreSQL bgwriter", "9C8A4E", 1),
3737
Plugin.DELTA.simple_change),
3838

3939
("buffers_backend_fsync", "bgwriter[buffers_backend_fsync]",
4040
"Times a Backend Execute Its Own Fsync",
41-
("PostgreSQL bgwriter", "9C8A4E", 0),
41+
("PostgreSQL bgwriter", "00CC00", 0),
4242
Plugin.DELTA.simple_change),
4343

4444
("buffers_alloc", "bgwriter[buffers_alloc]",
4545
"Buffers Allocated",
46-
("PostgreSQL bgwriter", "3B415A", 1),
46+
("PostgreSQL bgwriter", "FF5656", 1),
4747
Plugin.DELTA.simple_change)
4848
]
4949

mamonsu/plugins/pgsql/cfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def discovery_rules(self, template, dashboard=False):
155155
"name": "PostgreSQL CFS: Relation {#COMPRESSED_RELATION} Compress Ratio",
156156
"delay": self.timeRatioInterval,
157157
"items": [{
158-
"color": "8B817C",
158+
"color": "A39B98",
159159
"key": "pgsql.cfs.compress_ratio[{#COMPRESSED_RELATION}]"
160160
}]
161161
}]

mamonsu/plugins/pgsql/checkpoint.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ class Checkpoint(Plugin):
2929

3030
("checkpoints_timed", "count_timed",
3131
"by Timeout (in hour)",
32-
("PostgreSQL: checkpoint", "578159", 0),
32+
("PostgreSQL: checkpoint", "00CC00", 0),
3333
Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
3434

3535
("checkpoints_req", "count_wal",
3636
"by WAL (in hour)",
37-
("PostgreSQL: Checkpoint", "793F5D", 0),
37+
("PostgreSQL: Checkpoint", "FF5656", 0),
3838
Plugin.UNITS.none, Plugin.DELTA.speed_per_second, 60 * 60),
3939

4040
("checkpoint_write_time", "write_time",
4141
"Write Time",
42-
("PostgreSQL: Checkpoints", "00B0B8", 1),
42+
("PostgreSQL: Checkpoints", "00CC00", 1),
4343
Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1),
4444

4545
("checkpoint_sync_time", "checkpoint_sync_time",
4646
"Sync Time",
47-
("PostgreSQL: checkpoints", "9C8A4E", 1),
47+
("PostgreSQL: checkpoints", "FF5656", 1),
4848
Plugin.UNITS.ms, Plugin.DELTA.speed_per_second, 1)
4949
]
5050

mamonsu/plugins/pgsql/connections.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class Connections(Plugin):
1414
}
1515
# (state, key, name, graph item color)
1616
Items = [
17-
("active", "active", "Number of Active User Connections", "578159"),
18-
("idle", "idle", "Number of Idle User Connections", "8B817C"),
17+
("active", "active", "Number of Active User Connections", "00CC00"),
18+
("idle", "idle", "Number of Idle User Connections", "A39B98"),
1919
("idle in transaction", "idle_in_transaction",
2020
"Number of Idle in Transaction User Connections", "9C8A4E"),
2121
("idle in transaction (aborted)", "idle_in_transaction_aborted",
@@ -185,19 +185,19 @@ def graphs(self, template, dashboard=False):
185185
})
186186
items.append({
187187
"key": self.right_type(self.key, "total"),
188-
"color": "E57862",
188+
"color": "FF5656",
189189
"drawtype": 2
190190
})
191191
items.append({
192192
"key": self.right_type(self.key, "waiting"),
193-
"color": "0082A5",
193+
"color": "006AAE",
194194
"drawtype": 2
195195
})
196196

197197
if Pooler.server_version_greater("10.0"):
198198
items.append({
199199
"key": self.right_type(self.key, "other"),
200-
"color": "7EB29B",
200+
"color": "87C2B9",
201201
"drawtype": 2
202202
})
203203

mamonsu/plugins/pgsql/databases.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def graphs(self, template, dashboard=False):
103103
"name": "PostgreSQL Autovacuum: Count of Autovacuum Workers",
104104
"items": [{
105105
"key": self.right_type(self.key_autovacumm),
106-
"color": "7EB29B",
106+
"color": "87C2B9",
107107
"drawtype": 2
108108
}]
109109
})
@@ -155,14 +155,14 @@ def discovery_rules(self, template, dashboard=False):
155155
"name": "PostgreSQL Databases: {#DATABASE} size",
156156
"type": 1,
157157
"items": [
158-
{"color": "8B817C",
158+
{"color": "A39B98",
159159
"key": self.right_type(self.key_db_size, var_discovery="{#DATABASE},"),
160160
"drawtype": 2}]
161161
},
162162
{
163163
"name": "PostgreSQL Databases: {#DATABASE} Bloating Overview",
164164
"items": [
165-
{"color": "7EB29B",
165+
{"color": "87C2B9",
166166
"key": self.right_type(self.key_db_bloating_tables, var_discovery="{#DATABASE},"),
167167
"drawtype": 2},
168168
{"color": "793F5D",
@@ -173,7 +173,7 @@ def discovery_rules(self, template, dashboard=False):
173173
{
174174
"name": "PostgreSQL Databases: {#DATABASE} Max age(datfrozenxid)",
175175
"items": [
176-
{"color": "7EB29B",
176+
{"color": "87C2B9",
177177
"key": self.right_type(self.key_db_age, var_discovery="{#DATABASE},"),
178178
"drawtype": 2},
179179
{"color": "793F5D",

mamonsu/plugins/pgsql/instance.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,55 @@ class Instance(Plugin):
1818
# ('graph name', color, side), units, delta
1919

2020
("xact_commit", "transactions[committed]", "Transactions Committed",
21-
("PostgreSQL Instance: Transactions Rate", "578159", 0),
21+
("PostgreSQL Instance: Transactions Rate", "00CC00", 0),
22+
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
23+
("xact_rollback", "events[xact_rollback]", "Rollback Events",
24+
("PostgreSQL Instance: Transactions Rate", "FF5656", 0),
25+
2226
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
2327
("blks_hit", "blocks[hit]", "Blocks Hit",
24-
("PostgreSQL Instance: Blocks Rate", "7EB29B", 0),
28+
("PostgreSQL Instance: Blocks Rate", "87C2B9", 0),
2529
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
2630
("blks_read", "blocks[read]", "Blocks Read",
2731
("PostgreSQL Instance: Blocks Rate", "793F5D", 0),
2832
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
2933

3034
("conflicts", "events[conflicts]", "Conflict Events",
31-
("PostgreSQL Instance: Events", "9C8A4E", 0),
35+
("PostgreSQL Instance: Events", "00CC00", 0),
3236
Plugin.UNITS.none, Plugin.DELTA.simple_change),
3337
("deadlocks", "events[deadlocks]", "Deadlock Events",
34-
("PostgreSQL Instance: Events", "3B415A", 0),
38+
("PostgreSQL Instance: Events", "FF5656", 0),
3539
Plugin.UNITS.none, Plugin.DELTA.simple_change),
36-
("xact_rollback", "events[xact_rollback]", "Rollback Events",
37-
("PostgreSQL Instance: Transactions Rate", "E57862", 0),
38-
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
3940

4041
("temp_bytes", "temp[bytes]", "Temp Bytes Written",
4142
("PostgreSQL Instance: Temp Files", "00B0B8", 0),
4243
Plugin.UNITS.bytes, Plugin.DELTA.simple_change),
4344
("temp_files", "temp[files]", "Temp Files Created",
44-
("PostgreSQL Instance: Temp Files", "0082A5", 1),
45+
("PostgreSQL Instance: Temp Files", "006AAE", 1),
4546
Plugin.UNITS.none, Plugin.DELTA.simple_change),
4647

4748
# stacked
4849
("tup_deleted", "tuples[deleted]", "Tuples Deleted",
49-
("PostgreSQL Instance: Tuples", "3B415A", 0),
50+
("PostgreSQL Instance: Tuples", "FF5656", 0),
5051
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
5152
("tup_fetched", "tuples[fetched]", "Tuples Fetched",
52-
("PostgreSQL Instance: Tuples", "7EB29B", 0),
53+
("PostgreSQL Instance: Tuples", "006AAE", 0),
5354
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
5455
("tup_inserted", "tuples[inserted]", "Tuples Inserted",
55-
("PostgreSQL Instance: Tuples", "00B0B8", 0),
56+
("PostgreSQL Instance: Tuples", "00CC00", 0),
5657
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
5758
("tup_returned", "tuples[returned]", "Tuples Returned",
58-
("PostgreSQL Instance: Tuples", "9C8A4E", 1),
59+
("PostgreSQL Instance: Tuples", "001219", 1),
5960
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
6061
("tup_updated", "tuples[updated]", "Tuples Updated",
61-
("PostgreSQL Instance: Tuples", "6A4F5F", 0),
62+
("PostgreSQL Instance: Tuples", "9C8A4E", 0),
6263
Plugin.UNITS.none, Plugin.DELTA.speed_per_second),
6364
]
6465
Items_pg_12 = [
6566
# key, zbx_key, description,
6667
# ('graph name', color, side), units, delta
6768
("checksum_failures", "events[checksum_failures]", "checksum_failures Events",
68-
("PostgreSQL Instance: Events", "793F5D", 0),
69+
("PostgreSQL Instance: Events", "006AAE", 0),
6970
Plugin.UNITS.none, Plugin.DELTA.simple_change)
7071
]
7172

mamonsu/plugins/pgsql/pg_buffercache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class PgBufferCache(Plugin):
2222
query = [query_agent_size, query_agent_twice_used, query_agent_dirty]
2323
Items = [
2424
# key, name, color
25-
("size", "PostgreSQL pg_buffercache: Shared Buffer Size", "E57862"),
26-
("twice_used", "PostgreSQL pg_buffercache: Shared Buffer Twice Used Size", "7EB29B"),
27-
("dirty", "PostgreSQL pg_buffercache: Shared Buffer Dirty Size", "793F5D")
25+
("size", "PostgreSQL pg_buffercache: Shared Buffer Size", "00CC00"),
26+
("twice_used", "PostgreSQL pg_buffercache: Shared Buffer Twice Used Size", "006AAE"),
27+
("dirty", "PostgreSQL pg_buffercache: Shared Buffer Dirty Size", "FF5656")
2828
]
2929

3030
graph_name = "PostgreSQL pg_buffercache: Shared Buffer"

mamonsu/plugins/pgsql/pg_locks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ class PgLocks(Plugin):
2323
# key, desc, color
2424
("accessshare",
2525
"Read Only Queries",
26-
"578159"),
26+
"00CC00"),
2727
("rowshare",
2828
"SELECT FOR SHARE and SELECT FOR UPDATE",
2929
"3B415A"),
3030
("rowexclusive",
3131
"Write Queries",
32-
"7EB29B"),
32+
"FF5656"),
3333
("shareupdateexclusive",
3434
"VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY",
3535
"F6CB93"),
3636
("share",
3737
"CREATE INDEX",
38-
"0082A5"),
38+
"006AAE"),
3939
("sharerowexclusive",
4040
"Locks from Application",
4141
"00B0B8"),

0 commit comments

Comments
 (0)