mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Compare commits
749 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71c20e159d | ||
|
|
205c143782 | ||
|
|
ed7c919201 | ||
|
|
842014160b | ||
|
|
2a0f464c63 | ||
|
|
c412f025ca | ||
|
|
299371b38c | ||
|
|
d57c38bb3d | ||
|
|
59231739a2 | ||
|
|
7ba6941aed | ||
|
|
95f9b348cd | ||
|
|
ebeeb6c3a5 | ||
|
|
07367a2ca3 | ||
|
|
3d848a70c7 | ||
|
|
c5d1cd919a | ||
|
|
c08b70a38d | ||
|
|
add9800f42 | ||
|
|
1395dd9fb5 | ||
|
|
12b89f7e24 | ||
|
|
0ab5ca32a6 | ||
|
|
19f42e60ba | ||
|
|
a5b952f18c | ||
|
|
80de181827 | ||
|
|
44856f9c04 | ||
|
|
40c6c65ee5 | ||
|
|
6cb4439d59 | ||
|
|
03970f985e | ||
|
|
31a94b779f | ||
|
|
f9a400c34c | ||
|
|
5cea39c9c0 | ||
|
|
99cd07658e | ||
|
|
11fcaa2538 | ||
|
|
8af961ff3f | ||
|
|
10ee4a17a5 | ||
|
|
f029fa1cc8 | ||
|
|
bbe0ba0389 | ||
|
|
7084c69171 | ||
|
|
3ada622bd0 | ||
|
|
93d08de2ab | ||
|
|
64da64105e | ||
|
|
3e448b123b | ||
|
|
bedbebbe04 | ||
|
|
4b3d876fbd | ||
|
|
d52709cb72 | ||
|
|
ed53e59a00 | ||
|
|
0fcf089d39 | ||
|
|
25abc1b59b | ||
|
|
516eef0431 | ||
|
|
5df5bdef59 | ||
|
|
4eddad5bf4 | ||
|
|
794bfcc25c | ||
|
|
0f56f06937 | ||
|
|
78a87c4ed0 | ||
|
|
af41eed26c | ||
|
|
5169ac32a1 | ||
|
|
1e7c50b0fe | ||
|
|
31f7521501 | ||
|
|
a29e700b83 | ||
|
|
04c45bd39f | ||
|
|
524bf1f676 | ||
|
|
ee63f3fe0d | ||
|
|
295db87113 | ||
|
|
1f54292fbc | ||
|
|
eea4e2642c | ||
|
|
8b81501b44 | ||
|
|
148f3198ce | ||
|
|
b7417a07ad | ||
|
|
844311f4e8 | ||
|
|
da45606f64 | ||
|
|
cf0cc4cc17 | ||
|
|
edd8fd0fbc | ||
|
|
05c3613d3f | ||
|
|
ebbbebf352 | ||
|
|
ea478ae5e6 | ||
|
|
be57534b2a | ||
|
|
7c11f0fa38 | ||
|
|
a3b05c3760 | ||
|
|
04a91b2bb7 | ||
|
|
1d81a20e6f | ||
|
|
989ec68666 | ||
|
|
5401e2729b | ||
|
|
5c6bb2fa0d | ||
|
|
858e02f7c6 | ||
|
|
dd65bd5744 | ||
|
|
6ba1bdb7de | ||
|
|
b7e3263b38 | ||
|
|
4830d54229 | ||
|
|
85911c8ff4 | ||
|
|
296891ca67 | ||
|
|
7d0762ff35 | ||
|
|
127d9e6196 | ||
|
|
6c58281c2e | ||
|
|
beeeb4bd33 | ||
|
|
9aa1462e17 | ||
|
|
6637d9c954 | ||
|
|
f1344f16fa | ||
|
|
abbaa1c11f | ||
|
|
87a10a721b | ||
|
|
2230df591e | ||
|
|
2898805514 | ||
|
|
c906ccda91 | ||
|
|
d1101aee47 | ||
|
|
39157360ef | ||
|
|
e4a34ecd2b | ||
|
|
d444ad31ce | ||
|
|
06a11f43ea | ||
|
|
fdcf12fb86 | ||
|
|
59682f6840 | ||
|
|
949052d00c | ||
|
|
e7fd39112e | ||
|
|
028c4a9cb4 | ||
|
|
274f954b8a | ||
|
|
e44bceaed5 | ||
|
|
9fe8d8a3b4 | ||
|
|
ab59d529ec | ||
|
|
7581e4f63a | ||
|
|
8f15579136 | ||
|
|
2b9323ac98 | ||
|
|
8676b7ccde | ||
|
|
cd43935656 | ||
|
|
f6a08fc3d4 | ||
|
|
166af4ce8d | ||
|
|
7943977ff5 | ||
|
|
2e407d9e8f | ||
|
|
04cf16cc94 | ||
|
|
fa6df3cff8 | ||
|
|
0476689c25 | ||
|
|
ce2d955c86 | ||
|
|
d62a1f077a | ||
|
|
14a1d61bb1 | ||
|
|
069522febe | ||
|
|
28df1e6aaf | ||
|
|
bdcef1a37e | ||
|
|
1580810597 | ||
|
|
d4c724e79c | ||
|
|
361952ec5a | ||
|
|
c2a4713024 | ||
|
|
8c60e98852 | ||
|
|
10371e8411 | ||
|
|
053bcff11c | ||
|
|
841bd16701 | ||
|
|
657e6e2f8d | ||
|
|
89ea7c02c6 | ||
|
|
297b9158e1 | ||
|
|
0ab1f9e19a | ||
|
|
25b54d1f62 | ||
|
|
854ef20826 | ||
|
|
bed4e6a152 | ||
|
|
a379054f5b | ||
|
|
b5e933ba12 | ||
|
|
9afed6e43b | ||
|
|
015ce23fe2 | ||
|
|
6dcf09a2f6 | ||
|
|
7391df9f7b | ||
|
|
6032667ea7 | ||
|
|
8ae8d6aa27 | ||
|
|
b281652009 | ||
|
|
82e9a4a8ef | ||
|
|
f9baa603f4 | ||
|
|
f1a553aac6 | ||
|
|
61df3ec581 | ||
|
|
8ffc07a110 | ||
|
|
a794170adf | ||
|
|
6c28c14e7c | ||
|
|
a1b17a238b | ||
|
|
53f41a9434 | ||
|
|
2223050523 | ||
|
|
eb7282201b | ||
|
|
396416ad29 | ||
|
|
9c76c9f79c | ||
|
|
c4adb03c50 | ||
|
|
1d8beb9222 | ||
|
|
e6644ad3ec | ||
|
|
dce40cb9fb | ||
|
|
d6cf983b93 | ||
|
|
0b350b686e | ||
|
|
fa7d2534bf | ||
|
|
3a2afa4bf4 | ||
|
|
57c9c5b23f | ||
|
|
facc6619e2 | ||
|
|
6b0a65c427 | ||
|
|
fb489adc66 | ||
|
|
45c03aee45 | ||
|
|
41cfdcdc00 | ||
|
|
e14475afb0 | ||
|
|
64a3c348bd | ||
|
|
c57513618b | ||
|
|
b114de1fd9 | ||
|
|
ed0276b61e | ||
|
|
6998f11967 | ||
|
|
956fcf65ed | ||
|
|
e32844d2f2 | ||
|
|
3dca9da5e3 | ||
|
|
5a060722a1 | ||
|
|
f3dac743d1 | ||
|
|
a07ed7ee85 | ||
|
|
d54722cf03 | ||
|
|
ba09964eaa | ||
|
|
c0f73a8112 | ||
|
|
06b6ef2889 | ||
|
|
602f0648e0 | ||
|
|
7e2f05866c | ||
|
|
acfc48c82c | ||
|
|
2b8257d866 | ||
|
|
a3bcb3c491 | ||
|
|
658b936a01 | ||
|
|
9b1443423e | ||
|
|
4848ba78d9 | ||
|
|
d16d43de9d | ||
|
|
fa36fb788c | ||
|
|
276214da98 | ||
|
|
1c94328dbd | ||
|
|
7f51fdcfa1 | ||
|
|
541cb2e1b1 | ||
|
|
2396f226dd | ||
|
|
58c26ea055 | ||
|
|
413f869424 | ||
|
|
e1ab0b3ef7 | ||
|
|
0cb7b6c96a | ||
|
|
3f0c899f17 | ||
|
|
a25efc6dd6 | ||
|
|
8038fc9472 | ||
|
|
17c3dc4914 | ||
|
|
2e53da32d1 | ||
|
|
57aefdf332 | ||
|
|
9edbe8affc | ||
|
|
033dacf8be | ||
|
|
b82246595f | ||
|
|
277950fc51 | ||
|
|
0261b8e210 | ||
|
|
445b4de69e | ||
|
|
3b60a3a1ae | ||
|
|
5103e2c229 | ||
|
|
e9dc7de2e8 | ||
|
|
c7d04ddbcf | ||
|
|
af5aecd127 | ||
|
|
ecc297a112 | ||
|
|
1067211033 | ||
|
|
64c3de0450 | ||
|
|
20986852de | ||
|
|
2239aa6c25 | ||
|
|
908789230b | ||
|
|
eb74d7fc14 | ||
|
|
519822c971 | ||
|
|
9be6af6477 | ||
|
|
5838f8be95 | ||
|
|
da8098752e | ||
|
|
0fcd4502bd | ||
|
|
9e768f5be7 | ||
|
|
50fa0677d9 | ||
|
|
3641d2360e | ||
|
|
9eab7640c4 | ||
|
|
8feb7c585f | ||
|
|
654efdc503 | ||
|
|
46b01bcb93 | ||
|
|
4895a61af3 | ||
|
|
c820e2e8f5 | ||
|
|
c9c7f0ada6 | ||
|
|
3069e508f5 | ||
|
|
62601fc4ad | ||
|
|
5d05ede3e6 | ||
|
|
c3982bf747 | ||
|
|
ef97013051 | ||
|
|
07d37cd9b0 | ||
|
|
6b3bed69d3 | ||
|
|
f99f45505d | ||
|
|
7caf1f841a | ||
|
|
8ea45f5295 | ||
|
|
a57669a6e0 | ||
|
|
80a0b889c1 | ||
|
|
57f508f15c | ||
|
|
b732a87409 | ||
|
|
c2b97cbabd | ||
|
|
645e779d7c | ||
|
|
b6a9c788bf | ||
|
|
8bd5c59186 | ||
|
|
22b9ec5a1a | ||
|
|
ed2f6f90eb | ||
|
|
609e118a7a | ||
|
|
8ed1456e02 | ||
|
|
75002f93d3 | ||
|
|
84fb663e09 | ||
|
|
7f051938d0 | ||
|
|
913a1f72b6 | ||
|
|
cb7eeb7d46 | ||
|
|
92c58efd63 | ||
|
|
f5acab8ad8 | ||
|
|
9b2c6b8838 | ||
|
|
33e6fffd5d | ||
|
|
c61caed1af | ||
|
|
474da8f3f0 | ||
|
|
0ed510cfd8 | ||
|
|
5e884dc675 | ||
|
|
fcde1a275e | ||
|
|
bcd804403a | ||
|
|
ef1c3c9674 | ||
|
|
7d995f0735 | ||
|
|
89342ba9ee | ||
|
|
b18bcc7692 | ||
|
|
55d6513853 | ||
|
|
d11972c07d | ||
|
|
b2c798a934 | ||
|
|
200e4c806c | ||
|
|
d96b3519b2 | ||
|
|
6f5c514be3 | ||
|
|
89fe57fbc1 | ||
|
|
f168726778 | ||
|
|
69ff580d4c | ||
|
|
6dfa82bafa | ||
|
|
63c0850352 | ||
|
|
49d1480e15 | ||
|
|
0dd75db4d7 | ||
|
|
2773fc4f83 | ||
|
|
8fc140c16a | ||
|
|
c7a740d51f | ||
|
|
611ae2f154 | ||
|
|
326503bcf9 | ||
|
|
ad4adc742f | ||
|
|
7befc97ab7 | ||
|
|
28f98c159b | ||
|
|
e7ff1a7954 | ||
|
|
f93b8b2e10 | ||
|
|
c64c351a85 | ||
|
|
75c5ec1215 | ||
|
|
7b3a08ef25 | ||
|
|
ef660d49c3 | ||
|
|
bcf4bcc5af | ||
|
|
e8f8296d53 | ||
|
|
c360c80291 | ||
|
|
8b62207b8b | ||
|
|
1a92514253 | ||
|
|
725490c87e | ||
|
|
f811c0a543 | ||
|
|
a26a81beec | ||
|
|
cb5b3d3a8d | ||
|
|
26ee74be6e | ||
|
|
0d1c32a453 | ||
|
|
ab0c9dfeb9 | ||
|
|
0ebd391cd2 | ||
|
|
a0b077b54e | ||
|
|
d78fcd6ae3 | ||
|
|
a397048ea4 | ||
|
|
e4da6c9379 | ||
|
|
be1cdec6fa | ||
|
|
5df4822ef0 | ||
|
|
1a89a14ee3 | ||
|
|
97f7770d98 | ||
|
|
0327f8818a | ||
|
|
b03c6aec57 | ||
|
|
3c9a035249 | ||
|
|
4b075cffe7 | ||
|
|
b85c308e78 | ||
|
|
9e58c8c572 | ||
|
|
5cc08030ce | ||
|
|
50699ed01f | ||
|
|
486e245c14 | ||
|
|
cd9105d0a9 | ||
|
|
99e9f5ca68 | ||
|
|
f35550663d | ||
|
|
39eb7fff1e | ||
|
|
fa6748fe79 | ||
|
|
2c12e625b4 | ||
|
|
49daed828b | ||
|
|
a3359dbec4 | ||
|
|
c8bae60060 | ||
|
|
0f8253241e | ||
|
|
ed9c0c2a2c | ||
|
|
3c5db004c4 | ||
|
|
5eac1e000f | ||
|
|
b42d6feaa0 | ||
|
|
d61d9b1789 | ||
|
|
2c7e14afcd | ||
|
|
58ade8948c | ||
|
|
10e08093c6 | ||
|
|
58bc8bf6ce | ||
|
|
b1e10567f6 | ||
|
|
1a464630f2 | ||
|
|
4aea02e215 | ||
|
|
b1b8d6f090 | ||
|
|
0de1406b5c | ||
|
|
e068b360a4 | ||
|
|
385deb254b | ||
|
|
b28f9ed422 | ||
|
|
117e0366e5 | ||
|
|
6759aa3267 | ||
|
|
aab506fb58 | ||
|
|
b111bbf926 | ||
|
|
8d58f1fe91 | ||
|
|
20871ba401 | ||
|
|
fb121c1df4 | ||
|
|
80888ae910 | ||
|
|
84c74fbb2a | ||
|
|
9caeb0cfdf | ||
|
|
796c02adfb | ||
|
|
0812182fd2 | ||
|
|
8368c3d102 | ||
|
|
dca50f42c7 | ||
|
|
1944c24fe7 | ||
|
|
f136334414 | ||
|
|
c5f99ad701 | ||
|
|
62b3bc6a6a | ||
|
|
e7fe2b808f | ||
|
|
a85f0003e3 | ||
|
|
d6142f7498 | ||
|
|
63661dea5b | ||
|
|
499a798d3e | ||
|
|
23da070784 | ||
|
|
5efc4975c6 | ||
|
|
013262c694 | ||
|
|
12d8d2d2fc | ||
|
|
af83432fdb | ||
|
|
34d3ea9ef0 | ||
|
|
9c2ebd53d7 | ||
|
|
fc569b50d4 | ||
|
|
06873f5054 | ||
|
|
420ee4ac65 | ||
|
|
2659bc1440 | ||
|
|
ded7af9fe3 | ||
|
|
75dd81adcd | ||
|
|
b749199f55 | ||
|
|
731e9be82b | ||
|
|
22844b430e | ||
|
|
dbfb3176f5 | ||
|
|
0591afa80f | ||
|
|
be2f5a9f15 | ||
|
|
633ceb6136 | ||
|
|
7610f3633d | ||
|
|
acf2437020 | ||
|
|
f28733d94d | ||
|
|
8398d73b61 | ||
|
|
46876228ba | ||
|
|
7de5e4db8b | ||
|
|
33273bf83c | ||
|
|
719b3e5705 | ||
|
|
ae5fd47f72 | ||
|
|
57f9728867 | ||
|
|
b07118b298 | ||
|
|
e669ecacf3 | ||
|
|
725032d31f | ||
|
|
ea05fd58c1 | ||
|
|
1ecdc1249c | ||
|
|
b016f6fefe | ||
|
|
8c64b65942 | ||
|
|
e0e1250592 | ||
|
|
64694a1ead | ||
|
|
7c1c33ecdc | ||
|
|
48303fce62 | ||
|
|
67cac33779 | ||
|
|
7c9229e9c9 | ||
|
|
f8b5cc98b2 | ||
|
|
ddde35ec1c | ||
|
|
df7c51d303 | ||
|
|
96de41e4f0 | ||
|
|
eb63964a90 | ||
|
|
00942ba48f | ||
|
|
9735085328 | ||
|
|
367dec4024 | ||
|
|
3200b3bc10 | ||
|
|
e98035e418 | ||
|
|
477d43b675 | ||
|
|
01d7730ffb | ||
|
|
d69227a8f1 | ||
|
|
7e6fa9fcbd | ||
|
|
a58ef98a9c | ||
|
|
5805c94c8a | ||
|
|
df0afdc7be | ||
|
|
5bf12e4e7d | ||
|
|
c9f22aa0c7 | ||
|
|
8c91357fbb | ||
|
|
4a0265ef25 | ||
|
|
d392be05a2 | ||
|
|
824825860f | ||
|
|
0a4261bba4 | ||
|
|
93e76e27d7 | ||
|
|
9812b76138 | ||
|
|
988a323757 | ||
|
|
29fc5c669d | ||
|
|
fbc3c8cede | ||
|
|
11f341366b | ||
|
|
2414498846 | ||
|
|
1977f48eb1 | ||
|
|
dc1c5763aa | ||
|
|
14e16a9d18 | ||
|
|
4505a5a97a | ||
|
|
f076240832 | ||
|
|
086d1c03cf | ||
|
|
c6fab002be | ||
|
|
48be1a9eda | ||
|
|
59e3f45e70 | ||
|
|
294a205dfd | ||
|
|
80500b6ede | ||
|
|
06d9cf2292 | ||
|
|
b7a3ad7044 | ||
|
|
b6df0fb1a8 | ||
|
|
42e0d4330d | ||
|
|
cfae2c3418 | ||
|
|
fd314b5187 | ||
|
|
f6a680730f | ||
|
|
0164f4a9d7 | ||
|
|
b37b4559b0 | ||
|
|
81d9e12c8d | ||
|
|
5aa4450691 | ||
|
|
144b81eab7 | ||
|
|
c2e4d39117 | ||
|
|
5397edc14d | ||
|
|
82d7c28fd7 | ||
|
|
b3159d683c | ||
|
|
56d6190fa3 | ||
|
|
b59d2149b8 | ||
|
|
3ca4ce9c80 | ||
|
|
c3a6b33b33 | ||
|
|
de964eb64a | ||
|
|
e421d84033 | ||
|
|
76e02d691d | ||
|
|
e7a8668420 | ||
|
|
b71da10a80 | ||
|
|
a73f8bf8da | ||
|
|
eae55beccc | ||
|
|
2b9c76efe1 | ||
|
|
b1b3abeb2f | ||
|
|
8d028ad705 | ||
|
|
50098bd092 | ||
|
|
6f45cfc60c | ||
|
|
d3030b8815 | ||
|
|
12e97c6b9a | ||
|
|
a6797d8608 | ||
|
|
640aac54f5 | ||
|
|
89e7ae9593 | ||
|
|
80cc4ec265 | ||
|
|
ffb187dd84 | ||
|
|
48117cc0d6 | ||
|
|
a4c236979f | ||
|
|
73e9748631 | ||
|
|
d46289e59d | ||
|
|
55ab809d5c | ||
|
|
6843668193 | ||
|
|
c6a2f697b8 | ||
|
|
02340feb70 | ||
|
|
42e1030f85 | ||
|
|
221b6349f1 | ||
|
|
ac1dbe4e46 | ||
|
|
75c4b50d96 | ||
|
|
20955e1a8f | ||
|
|
4fa8b8c4ef | ||
|
|
bf29cd42d6 | ||
|
|
d85ecb0d12 | ||
|
|
27519a3966 | ||
|
|
50480b85dd | ||
|
|
14d236cac7 | ||
|
|
220bd6798e | ||
|
|
2003f5a946 | ||
|
|
7e75df6334 | ||
|
|
b4775ae1e7 | ||
|
|
fec1b3f323 | ||
|
|
50aeaa957e | ||
|
|
9a59102f92 | ||
|
|
6b13738ea7 | ||
|
|
3c2dc0dbfb | ||
|
|
243f0034f3 | ||
|
|
1dfe20b0c9 | ||
|
|
d6cffb367f | ||
|
|
2561fccce5 | ||
|
|
3933936aa9 | ||
|
|
12f628aa5d | ||
|
|
5ed95dcd36 | ||
|
|
47ef80cc44 | ||
|
|
832beeef22 | ||
|
|
6598eb9a48 | ||
|
|
4e36f539ef | ||
|
|
93a7da0018 | ||
|
|
622694f405 | ||
|
|
01c5de3620 | ||
|
|
5e1248cc00 | ||
|
|
efecdff59d | ||
|
|
3c5deccb84 | ||
|
|
8e12daf1c7 | ||
|
|
008da18727 | ||
|
|
f108cc86da | ||
|
|
f2b2a25a19 | ||
|
|
82a1a7e5c7 | ||
|
|
e4b61e2667 | ||
|
|
cd4d1ca37b | ||
|
|
d238de9fb1 | ||
|
|
4b07e8bbb6 | ||
|
|
2cb169eff5 | ||
|
|
b53b455719 | ||
|
|
cf51d1f5d7 | ||
|
|
296fd71b5a | ||
|
|
4f17e61e8a | ||
|
|
95126b7c36 | ||
|
|
d2b6e75483 | ||
|
|
320660945c | ||
|
|
a0d02b2aa5 | ||
|
|
19cf64a6f0 | ||
|
|
01017040e3 | ||
|
|
9c7f5ff771 | ||
|
|
3718a06ea9 | ||
|
|
2950d2ce9f | ||
|
|
4f59d0867d | ||
|
|
ee98c7a653 | ||
|
|
af902dae57 | ||
|
|
0e23c6ac61 | ||
|
|
30362bb72e | ||
|
|
dd7f86bfa0 | ||
|
|
b231a06ee8 | ||
|
|
d86a042070 | ||
|
|
b0e34a802d | ||
|
|
3460b88167 | ||
|
|
2668370450 | ||
|
|
42e1e748a3 | ||
|
|
0c620a06f7 | ||
|
|
bae7b0400c | ||
|
|
b87083e6b1 | ||
|
|
db4d81863b | ||
|
|
2c15bc4127 | ||
|
|
f7a8e77cc5 | ||
|
|
7c16bd31a2 | ||
|
|
d5d23c8c60 | ||
|
|
3948557da8 | ||
|
|
8057d49be0 | ||
|
|
22bfb9deef | ||
|
|
c9f4560cf9 | ||
|
|
6dee27e5a5 | ||
|
|
9ddea01f12 | ||
|
|
8a8790d49b | ||
|
|
e74b8d27b6 | ||
|
|
a38d254877 | ||
|
|
3ca4e19199 | ||
|
|
0b3b1e4ed4 | ||
|
|
b068b631be | ||
|
|
9bdac0edbf | ||
|
|
56604f702f | ||
|
|
25bdc36183 | ||
|
|
fa7582135e | ||
|
|
40e94e45a2 | ||
|
|
e119d51d08 | ||
|
|
7c63a5e52f | ||
|
|
3a46c7eb27 | ||
|
|
80bda24b5f | ||
|
|
5f3f4c1a73 | ||
|
|
1bdfc1962a | ||
|
|
ff9245c31d | ||
|
|
085e7c80e7 | ||
|
|
9a13133a5f | ||
|
|
1baeeb99db | ||
|
|
8f1223c55b | ||
|
|
64ad2f6b80 | ||
|
|
39282d51ac | ||
|
|
76c3f7e94e | ||
|
|
2a14d59a45 | ||
|
|
d848e18bc0 | ||
|
|
3430118f09 | ||
|
|
e0c7ffbb12 | ||
|
|
ec669a701e | ||
|
|
8da84e8d64 | ||
|
|
90e94a14fb | ||
|
|
f33262d262 | ||
|
|
2e137b4e07 | ||
|
|
634bc0744d | ||
|
|
8cbca4430a | ||
|
|
6c166908a1 | ||
|
|
42ebb687f8 | ||
|
|
d9761e771f | ||
|
|
2575b79c8b | ||
|
|
6009098c9c | ||
|
|
2946e48321 | ||
|
|
8256a84efe | ||
|
|
c2da5c56b8 | ||
|
|
ef64014100 | ||
|
|
2bb5d332ff | ||
|
|
54d71c7cc9 | ||
|
|
14437f2984 | ||
|
|
928ee52a7e | ||
|
|
82d87db762 | ||
|
|
f26507e540 | ||
|
|
dcd32b9162 | ||
|
|
d59eb03f40 | ||
|
|
d096b36434 | ||
|
|
5624401fcf | ||
|
|
8c4992bf9a | ||
|
|
a4984dc477 | ||
|
|
c2676f9fda | ||
|
|
9bb3820e82 | ||
|
|
72ccaf754f | ||
|
|
da0d387ae0 | ||
|
|
e06fe9146c | ||
|
|
e5eb3ab297 | ||
|
|
012589b848 | ||
|
|
43a2c4870e | ||
|
|
8fe10e6314 | ||
|
|
cab6c0cefb | ||
|
|
07c2c2b9ac | ||
|
|
a4f8cfa287 | ||
|
|
1bafee59c8 | ||
|
|
e8f9608372 | ||
|
|
d8904f7ac8 | ||
|
|
8f8e4334b9 | ||
|
|
293e009321 | ||
|
|
5d53f1f605 | ||
|
|
87212bb25f | ||
|
|
7076c83185 | ||
|
|
ccbf4defe8 | ||
|
|
c3c3de01e0 | ||
|
|
7efe658503 | ||
|
|
88301c97eb | ||
|
|
e68a04ee5b | ||
|
|
655fa96c67 | ||
|
|
ce5d09ed2e | ||
|
|
e34a7c032a | ||
|
|
88ef46b2d4 | ||
|
|
d5f8cdda7d | ||
|
|
4fbaccc0f2 | ||
|
|
b4dd34355e | ||
|
|
2b02e6ee29 | ||
|
|
a262a89e13 | ||
|
|
50233460b2 | ||
|
|
8776fc1356 | ||
|
|
cd793c8e67 | ||
|
|
9a6c5896dd | ||
|
|
43e96a8708 | ||
|
|
38702d03ac | ||
|
|
335fa1b003 | ||
|
|
91140642ef | ||
|
|
eb0c7fbf68 | ||
|
|
d8af423a9c | ||
|
|
8693d4cae9 | ||
|
|
960a3ebe14 | ||
|
|
1105caed16 | ||
|
|
f35bb19f5a | ||
|
|
eee7816a50 | ||
|
|
58bb740e48 | ||
|
|
1101bc9477 | ||
|
|
6fd750e4e1 | ||
|
|
55d7cb0fec | ||
|
|
cc5901ffb0 | ||
|
|
e9c8be78ad | ||
|
|
779ce0e568 | ||
|
|
c351d2e8d4 | ||
|
|
dc2849f296 | ||
|
|
b10d259390 | ||
|
|
aac46f97ce | ||
|
|
46e4857a35 | ||
|
|
35a0a91a02 | ||
|
|
cd164793cc | ||
|
|
56f35f5068 | ||
|
|
e83a622152 | ||
|
|
6cdc0c14df | ||
|
|
d7fb478794 | ||
|
|
2c2bf18562 |
9
.github/workflows/docker_dev.yml
vendored
9
.github/workflows/docker_dev.yml
vendored
@@ -32,9 +32,16 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Set up dynamic build ARGs
|
||||
id: getargs
|
||||
id: getargs
|
||||
run: echo "version=$(cat ./stable/VERSION)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get release version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::${{ 'Dev' }}"
|
||||
|
||||
- name: Create .VERSION file
|
||||
run: echo "${{ steps.get_version.outputs.version }}" >> .VERSION
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ config/pialert.conf
|
||||
db/*
|
||||
db/pialert.db
|
||||
front/log/*
|
||||
front/api/*
|
||||
**/plugins/**/*.log
|
||||
**/%40eaDir/
|
||||
**/@eaDir/
|
||||
|
||||
@@ -8,7 +8,7 @@ ENV USER=pi USER_ID=1000 USER_GID=1000 PORT=20211
|
||||
# Todo, do we still need all these packages? I can already see sudo which isn't needed
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends tini snmp ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo nginx-light php php-cgi php-fpm php-sqlite3 php-curl sqlite3 dnsutils net-tools python3 iproute2 nmap python3-pip zip -y \
|
||||
&& apt-get install --no-install-recommends tini snmp ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo nginx-light php php-cgi php-fpm php-sqlite3 php-curl sqlite3 dnsutils net-tools python3 iproute2 nmap python3-pip zip systemctl usbutils traceroute -y \
|
||||
&& pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi \
|
||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
|
||||
&& apt-get clean autoclean \
|
||||
@@ -51,4 +51,4 @@ CMD ["/home/pi/pialert/dockerfiles/start.sh"]
|
||||
|
||||
|
||||
|
||||
## command to build docker: DOCKER_BUILDKIT=1 docker build . --iidfile dockerID
|
||||
## command to build docker: DOCKER_BUILDKIT=1 docker build . --iidfile dockerID
|
||||
|
||||
135
README.md
135
README.md
@@ -1,103 +1,90 @@
|
||||
# Pi.Alert
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
# 💻🔍 Network security scanner
|
||||
|
||||
💻🔍 WIFI / LAN intruder detector.
|
||||
Scans for devices, port changes on your WIFI/LAN and alerts you if unknown devices or changes are found.
|
||||
|
||||
Scans for devices connected to your WIFI / LAN and alerts you if new and unknown devices are found.
|
||||
|
||||
![Main screen][main]
|
||||
|
||||
# 🐳 Docker image
|
||||
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker_prod.yml)
|
||||
[](https://github.com/jokob-sk/Pi.Alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
| 🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) |🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs) |
|
||||
|----------------------|----------------------| ----------------------| ----------------------|
|
||||
|
||||
## 🔍 Scan Methods
|
||||
The system continuously scans the network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Scanning methods are:
|
||||
- **Method 1: arp-scan**. The arp-scan system utility is used to search
|
||||
for devices on the network using arp frames.
|
||||
- **Method 2: Pi-hole**. This method is optional and complementary to
|
||||
method 1. If the Pi-hole DNS server is active, Pi.Alert examines its
|
||||
activity looking for active devices using DNS that have not been
|
||||
detected by method 1.
|
||||
- **Method 3. dnsmasq**. This method is optional and complementary to the
|
||||
previous methods. If the DHCP server dnsmasq is active, Pi.Alert
|
||||
examines the DHCP leases (addresses assigned) to find active devices
|
||||
that were not discovered by the other methods.
|
||||
## Why PiAlert❓ Isn't this scary 👻...
|
||||
|
||||
## 🧩 Integrations
|
||||
- [Apprise](https://hub.docker.com/r/caronc/apprise), [Pushsafer](https://www.pushsafer.com/), [NTFY](https://ntfy.sh/)
|
||||
- [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md)
|
||||
- [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md)
|
||||
- [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md)
|
||||
- [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) for custom script monitoring
|
||||
...most of us don't know what's going on on our home network, but we want our family and data to _be safe_. _Command-line tools_ are great, but the output can be _hard to understand_ and action if you are not a network specialist 😖.
|
||||
|
||||
# 📥 Installation
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
PiAlert gives you peace of mind. _Visualize and immediately report 📬_ what is going on in your network - this is the first step to enhance your _network security 🔐_.
|
||||
|
||||
⚠ Only tested as a [docker container - follow these instructions here](dockerfiles/README.md).
|
||||
> Check out [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) if you want to install Pi.Alert on the server directly or original instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/)
|
||||
_PiAlert combines several network and other scanning tools 🔍 with notifications 📧 into one user-friendly package 📦_. You get an overview of network device Sessions, Connected devices, Favorites, Events, Presence, Down alerts, and IPs. You can schedule Nmap scans to detect changes in device ports and visualize your Network topology (even with undetectable, dummy devices).
|
||||
|
||||
# 📑 Features
|
||||
- Display:
|
||||
- Sessions, Connected devices, Favorites, Events, Presence, Concurrent devices, Down alerts, IP's
|
||||
- Manual Nmap scans, Optional speedtest for Device "Internet"
|
||||
- Simple Network relationship display
|
||||
- Maintenance tasks and Settings like:
|
||||
- Theme Selection (blue, red, green, yellow, black, purple) and Light/Dark-Mode Switch
|
||||
- DB maintenance, Backup, Restore tools and CSV Export / Import
|
||||
- Simple login Support
|
||||
- 🌟[Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins)
|
||||
- Create custom plugins with automatically generated settings and UI.
|
||||
- Monitor anything for changes
|
||||
- Check the [instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) carefully if you are up for a challenge! Current plugins include:
|
||||
- Detecting Rogue DHCP servers via NMAP
|
||||
- Monitoring HTTP status changes of domains/URLs
|
||||
- Import devices from DHCP.leases files, a UniFi controller, or an SNMP enabled router
|
||||
- Creation of dummy devices to visualize your [network map](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md)
|
||||
Setup a _kill switch ☠_ for your network via a smart plug with the available [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md) integration. Implement custom automations with the [CSV device Exports 📤](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins/csv_backup), [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md), or [API endpoints](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) features.
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 5][screen5] |
|
||||
Extend the app if you want to create your own scanner and handle the results and notifications in PiAlert. Check available [Plugins & Instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins). Looking forward to your contributions if you decide to share your work with the community ❤.
|
||||
|
||||
| ![Main screen][main] | ![Screen 1][screen1] | ![Screen 5][screen5] |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| ![Screen 3][screen3] | ![Screen 4][screen4] | ![Screen 6][screen6] |
|
||||
| ![Screen 8][screen8] | ![Report 2][report2] | ![Screen 9][screen9] |
|
||||
|
||||
## Scan Methods, Notifications, Integration, Extension system
|
||||
|
||||
| Features | Details |
|
||||
|-------------|-------------|
|
||||
| 🔍 | The app scans your network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: **arp-scan**. **Pi-hole - DB import**, **Pi-hole - DHCP leases import**, **Generic DHCP leases import**. **UNIFI controller import**, **SNMP-enabled router import**. Check the [Plugins](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) docs for more info on individual scans. |
|
||||
|📧 | Send notifications to more than 80+ services, including Telegram via [Apprise](https://hub.docker.com/r/caronc/apprise), or use [Pushsafer](https://www.pushsafer.com/), or [NTFY](https://ntfy.sh/). |
|
||||
|🧩 | Feed your data and device changes into [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md), read [API endpoints](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md), or use [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md) to setup custom automation flows. |
|
||||
|➕ | Build your own scanners with the [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) |
|
||||
|
||||
|
||||
|
||||
## Installation & Documentation
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
| Docs | Link |
|
||||
|-------------|-------------|
|
||||
| 📥🐳 | [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md)
|
||||
| 📥💻 | [HW install (experimental 🧪)](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HW_INSTALL.md) |
|
||||
| 📚 | [All Documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/README.md) (App Usage and Configuration) |
|
||||
|
||||
> Other Alternatives
|
||||
>
|
||||
> - Check out [leiweibau's on HW installed fork](https://github.com/leiweibau/Pi.Alert/) (maintained)
|
||||
> - Check instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/) (unmaintained)
|
||||
> - [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
|
||||
> - [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
|
||||
|
||||
### 🔗 Other Alternatives
|
||||
## ❤ Support me
|
||||
|
||||
- [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
|
||||
- [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
|
||||
Get:
|
||||
- Regular updates to keep your data and family safe 🔄
|
||||
- Better and more functionality➕
|
||||
- I don't get burned out and the app survives longer🔥🤯
|
||||
- Quicker and better support with issues 🆘
|
||||
- Less grumpy me 😄
|
||||
|
||||
### 📚 Documentation
|
||||
| [](https://github.com/sponsors/jokob-sk) | [](https://www.buymeacoffee.com/jokobsk) | [](https://www.patreon.com/user?u=84385063) |
|
||||
| --- | --- | --- |
|
||||
|
||||
- Initial Docker Setup: [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md)
|
||||
- App Usage and Configuration: [All Documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/README.md)
|
||||
- Bitcoin: `1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM`
|
||||
- Ethereum: `0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7`
|
||||
|
||||
> 📧 Email me at [jokob@duck.com](mailto:jokob@duck.com?subject=PiAlert) if you want to get in touch or if I should add other sponsorship platforms.
|
||||
|
||||
## Everything else
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
### License
|
||||
GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans)
|
||||
> GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans)
|
||||
|
||||
### 🥇 Special thanks
|
||||
### Special thanks
|
||||
|
||||
This code is a collaborative body of work, with special thanks to:
|
||||
This code is a collaborative body of work, with special thanks to:
|
||||
|
||||
- 🏆 [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert) is the original creator od PiAlert
|
||||
- [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and much more)
|
||||
- [Macleykun](https://github.com/Macleykun): Help with Dockerfile clean-up
|
||||
- [Final-Hawk](https://github.com/Final-Hawk): Help with NTFY, styling and other fixes
|
||||
- [TeroRERO](https://github.com/terorero): Spanish translation
|
||||
- [Data-Monkey](https://github.com/Data-Monkey): Split-up of the python.py file and more
|
||||
- Please see the [Git contributors](https://github.com/jokob-sk/Pi.Alert/graphs/contributors) for a full list of people and their contributions to the project
|
||||
|
||||
## ☕ Support me
|
||||
|
||||
<a href="https://github.com/sponsors/jokob-sk" target="_blank"><img src="https://i.imgur.com/X6p5ACK.png" alt="Sponsor Me on GitHub" style="height: 30px !important;width: 117px !important;" width="150px" ></a>
|
||||
<a href="https://www.buymeacoffee.com/jokobsk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 117px !important;" width="117px" height="30px" ></a>
|
||||
<a href="https://www.patreon.com/user?u=84385063" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" alt="Support me on patreon" style="height: 30px !important;width: 117px !important;" width="117px" ></a>
|
||||
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
> [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert) (the original creator of PiAlert), [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and much more), [Macleykun](https://github.com/Macleykun) (Help with Dockerfile clean-up) [Final-Hawk](https://github.com/Final-Hawk) (Help with NTFY, styling and other fixes), [TeroRERO](https://github.com/terorero) (Spanish translations), [Data-Monkey](https://github.com/Data-Monkey), (Split-up of the python.py file and more), [cvc90](https://github.com/cvc90) (Spanish translation and various UI work) to name a few...
|
||||
>
|
||||
> Please see the [Git contributors](https://github.com/jokob-sk/Pi.Alert/graphs/contributors) for a full list of people and their contributions to the project
|
||||
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
[main]: ./docs/img/devices_split.png "Main screen"
|
||||
@@ -108,7 +95,7 @@ BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
[screen5]: ./docs/img/network.png "Screen 5"
|
||||
[screen6]: ./docs/img/settings.png "Screen 6"
|
||||
[screen7]: ./docs/img/help_faq.png "Screen 7"
|
||||
[screen8]: ./docs/img/plugins_webmon.png "Screen 8"
|
||||
[screen8]: ./docs/img/plugins_rogue_dhcp.png "Screen 8"
|
||||
[screen9]: ./docs/img/device_nmap.png "Screen 9"
|
||||
[report1]: ./docs/img/4_report_1.jpg "Report sample 1"
|
||||
[report2]: ./docs/img/4_report_2.jpg "Report sample 2"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#000000; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
@@ -23,7 +23,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040">
|
||||
<table width=100% border=0 bgcolor=#00c0ef cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040">
|
||||
<tr>
|
||||
<td width=100%> Report Date: <b>2023-01-30 22:17</b> </td>
|
||||
</tr>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_template.html - Back module. Template to email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# report_template.html - Back module. Template to email reporting in HTML format #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<html>
|
||||
|
||||
@@ -16,37 +21,45 @@
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#000000; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040"> <tr>
|
||||
<td width=100%> Report Date: <b><REPORT_DATE></b> </td>
|
||||
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
|
||||
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
|
||||
<td height=200 valign=top style="padding: 10px">
|
||||
|
||||
<INTERNET_TABLE>
|
||||
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PORTS_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center"> Pi.Alert - <SERVER_NAME></td>
|
||||
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert" target="_blank" style="color: white">Pi.Alert</a>
|
||||
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
|
||||
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">©</span>2020 Puche (2022+
|
||||
<a style="color: white" href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b>Built on: <BUILD_PIALERT> </b> | <b> Version: <VERSION_PIALERT> </b> |
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank" style="color: white">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -54,4 +67,4 @@
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -4,6 +4,4 @@ Server: <SERVER_NAME>
|
||||
<SECTION_NEW_DEVICES>
|
||||
<SECTION_DEVICES_DOWN>
|
||||
<SECTION_EVENTS>
|
||||
<SECTION_INTERNET>
|
||||
<PORTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_template.html - Back module. Template to email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# report_template_new_version - Back module. Template to email reporting in text #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<html>
|
||||
|
||||
@@ -16,7 +21,7 @@
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#000000; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
@@ -25,37 +30,45 @@
|
||||
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/Pi.Alert/releases">🆕 New version available 🆕</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040"> <tr>
|
||||
<td width=100%> Report Date: <b><REPORT_DATE></b> </td>
|
||||
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
|
||||
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
|
||||
|
||||
<INTERNET_TABLE>
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PORTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
<td height=200 valign=top style="padding: 10px">
|
||||
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center"> Pi.Alert - <SERVER_NAME></td>
|
||||
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert" target="_blank" style="color: white">Pi.Alert</a>
|
||||
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
|
||||
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">©</span>2020 Puche (2022+
|
||||
<a style="color: white" href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b>Built on: <BUILD_PIALERT> </b> | <b> Version: <VERSION_PIALERT> </b> |
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank" style="color: white">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
#
|
||||
# Scan multiple interfaces (eth1 and eth0):
|
||||
# SCAN_SUBNETS = [ '192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0' ]
|
||||
|
||||
SCAN_SUBNETS=['192.168.1.0/24 --interface=eth1']
|
||||
PRINT_LOG=False
|
||||
|
||||
TIMEZONE='Europe/Berlin'
|
||||
PIALERT_WEB_PROTECTION=False
|
||||
PIALERT_WEB_PASSWORD='8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92'
|
||||
INCLUDED_SECTIONS=['internet','new_devices','down_devices','events']
|
||||
SCAN_CYCLE_MINUTES=5
|
||||
DAYS_TO_KEEP_EVENTS=90
|
||||
# Used for generating links in emails. Make sure not to add a trailing slash!
|
||||
REPORT_DASHBOARD_URL='http://pi.alert'
|
||||
@@ -93,25 +93,6 @@ DDNS_PASSWORD='A0000000B0000000C0000000D0000000'
|
||||
DDNS_UPDATE_URL='https://api.dynu.com/nic/update?'
|
||||
|
||||
|
||||
# PiHole
|
||||
#---------------------------
|
||||
# if enabled you need to map '/etc/pihole/pihole-FTL.db' in docker-compose.yml
|
||||
PIHOLE_ACTIVE=False
|
||||
# if enabled you need to map '/etc/pihole/dhcp.leases' in docker-compose.yml
|
||||
DHCP_ACTIVE=False
|
||||
|
||||
|
||||
# Pholus
|
||||
#---------------------------
|
||||
PHOLUS_ACTIVE=False
|
||||
PHOLUS_TIMEOUT=120
|
||||
PHOLUS_FORCE=False
|
||||
PHOLUS_DAYS_DATA=7
|
||||
PHOLUS_RUN='once'
|
||||
PHOLUS_RUN_TIMEOUT=600
|
||||
PHOLUS_RUN_SCHD='0 4 * * *'
|
||||
|
||||
|
||||
#-------------------IMPORTANT INFO-------------------#
|
||||
# This file is ingested by a python script, so if #
|
||||
# modified it needs to use python syntax #
|
||||
|
||||
@@ -9,32 +9,34 @@ services:
|
||||
- type=registry,ref=docker.io/jokob-sk/pi.alert:buildcache
|
||||
container_name: pialert
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
# restart: unless-stopped
|
||||
volumes:
|
||||
# - ${APP_DATA_LOCATION}/pialert_dev/config:/home/pi/pialert/config
|
||||
- ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||
# - ${APP_DATA_LOCATION}/pialert_dev/db:/home/pi/pialert/db
|
||||
- ${APP_DATA_LOCATION}/pialert/db:/home/pi/pialert/db
|
||||
- ${APP_DATA_LOCATION}/pialert_dev/config:/home/pi/pialert/config
|
||||
# - ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||
- ${APP_DATA_LOCATION}/pialert_dev/db:/home/pi/pialert/db
|
||||
# - ${APP_DATA_LOCATION}/pialert/db:/home/pi/pialert/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- ${LOGS_LOCATION}:/home/pi/pialert/front/log
|
||||
# ---------------------------------------------------------------------------
|
||||
# DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp1.leases:/mnt/dhcp1.leases
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases
|
||||
# - ${DEV_LOCATION}/back/pialert.py:/home/pi/pialert/back/pialert.py
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/pihole_dhcp_full.leases:/etc/pihole/dhcp.leases
|
||||
- ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db
|
||||
- ${DEV_LOCATION}/pialert:/home/pi/pialert/pialert
|
||||
# - ${DEV_LOCATION}/back/report_template.html:/home/pi/pialert/back/report_template.html
|
||||
# - ${DEV_LOCATION}/back/report_template_new_version.html:/home/pi/pialert/back/report_template_new_version.html
|
||||
# - ${DEV_LOCATION}/back/report_template.txt:/home/pi/pialert/back/report_template.txt
|
||||
- ${DEV_LOCATION}/pholus:/home/pi/pialert/pholus
|
||||
- ${DEV_LOCATION}/back/report_template.html:/home/pi/pialert/back/report_template.html
|
||||
- ${DEV_LOCATION}/back/report_template_new_version.html:/home/pi/pialert/back/report_template_new_version.html
|
||||
- ${DEV_LOCATION}/back/report_template.txt:/home/pi/pialert/back/report_template.txt
|
||||
- ${DEV_LOCATION}/dockerfiles:/home/pi/pialert/dockerfiles
|
||||
- ${APP_DATA_LOCATION}/pialert/php.ini:/etc/php/7.4/fpm/php.ini
|
||||
# - ${DEV_LOCATION}/front/api:/home/pi/pialert/front/api
|
||||
- ${DEV_LOCATION}/front/css:/home/pi/pialert/front/css
|
||||
- ${DEV_LOCATION}/front/lib/AdminLTE:/home/pi/pialert/front/lib/AdminLTE
|
||||
- ${DEV_LOCATION}/front/js:/home/pi/pialert/front/js
|
||||
- ${DEV_LOCATION}/front/api:/home/pi/pialert/front/api
|
||||
- ${DEV_LOCATION}/front/php:/home/pi/pialert/front/php
|
||||
- ${DEV_LOCATION}/front/deviceDetails.php:/home/pi/pialert/front/deviceDetails.php
|
||||
- ${DEV_LOCATION}/front/deviceDetailsTools.php:/home/pi/pialert/front/deviceDetailsTools.php
|
||||
- ${DEV_LOCATION}/front/devices.php:/home/pi/pialert/front/devices.php
|
||||
- ${DEV_LOCATION}/front/events.php:/home/pi/pialert/front/events.php
|
||||
- ${DEV_LOCATION}/front/plugins.php:/home/pi/pialert/front/plugins.php
|
||||
@@ -45,6 +47,10 @@ services:
|
||||
- ${DEV_LOCATION}/front/network.php:/home/pi/pialert/front/network.php
|
||||
- ${DEV_LOCATION}/front/presence.php:/home/pi/pialert/front/presence.php
|
||||
- ${DEV_LOCATION}/front/settings.php:/home/pi/pialert/front/settings.php
|
||||
- ${DEV_LOCATION}/front/systeminfo.php:/home/pi/pialert/front/systeminfo.php
|
||||
- ${DEV_LOCATION}/front/report.php:/home/pi/pialert/front/report.php
|
||||
- ${DEV_LOCATION}/front/flows.php:/home/pi/pialert/front/flows.php
|
||||
- ${DEV_LOCATION}/front/donations.php:/home/pi/pialert/front/donations.php
|
||||
- ${DEV_LOCATION}/front/plugins:/home/pi/pialert/front/plugins
|
||||
# DELETE END anyone trying to use this file: comment out / delete ABOVE lines, they are only for development purposes
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
|
||||
# 🐳 A docker image for Pi.Alert
|
||||
# PiAlert 💻🔍 Network security scanner
|
||||
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
| 🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) |🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs) |
|
||||
|----------------------|----------------------| ----------------------| ----------------------|
|
||||
|
||||
<a href="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" width="300px" />
|
||||
@@ -15,7 +16,6 @@
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/network.png" width="300px" />
|
||||
</a>
|
||||
|
||||
|
||||
## 📕 Basic Usage
|
||||
|
||||
- You will have to run the container on the host network, e.g:
|
||||
@@ -47,8 +47,9 @@ docker run -d --rm --network=host \
|
||||
| **Required** | `:/home/pi/pialert/db` | Folder which will contain the `pialert.db` file |
|
||||
|Optional| `:/home/pi/pialert/front/log` | Logs folder useful for debugging if you have issues setting up the container |
|
||||
|Optional| `:/etc/pihole/pihole-FTL.db` | PiHole's `pihole-FTL.db` database file. Required if you want to use PiHole |
|
||||
|Optional| `:/etc/pihole/dhcp.leases` | PiHole's `dhcp.leases` file. Required if you want to use PiHole |
|
||||
|Optional| `:/etc/pihole/dhcp.leases` | PiHole's `dhcp.leases` file. Required if you want to use PiHole `dhcp.leases` file. This has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry. (the path in the container must contain `pihole`)|
|
||||
|Optional| `:/home/pi/pialert/front/api` | A simple [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) containing static (but regularly updated) json and other files. |
|
||||
|Optional| `:/home/pi/pialert/front/plugins/<plugin>/ignore_plugin` | Map a file `ignore_plugin` to ignore a plugin. Plugins can be soft-disabled via settings. More in the [Plugin docs](/front/plugins/README.md). |
|
||||
|
||||
|
||||
### Config (`pialert.conf`)
|
||||
@@ -61,15 +62,26 @@ docker run -d --rm --network=host \
|
||||
|
||||
These are the most important settings to get at least some output in your Devices screen. Usually, only one approach is used, but you should be able to combine these approaches.
|
||||
|
||||
##### For arp-scan: ENABLE_ARPSCAN, SCAN_SUBNETS
|
||||
##### For arp-scan: ARPSCAN_RUN, SCAN_SUBNETS
|
||||
|
||||
- ❗ To use the arp-scan method, you need to set the `SCAN_SUBNETS` variable. See the documentation on how [to setup SUBNETS, VLANs & limitations](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md)
|
||||
|
||||
##### For pihole: PIHOLE_ACTIVE, DHCP_ACTIVE
|
||||
##### For pihole: PIHOLE_RUN, DHCPLSS_RUN
|
||||
|
||||
* `PIHOLE_ACTIVE`: You need to map `:/etc/pihole/pihole-FTL.db in the docker-compose.yml` file if you enable this setting.
|
||||
* `DHCP_ACTIVE` : You need to map `:/etc/pihole/dhcp.leases in the docker-compose.yml` file if you enable this setting.
|
||||
There are 2 approaches how to get PiHole devices imported. Via the PiHole import (PIHOLE) plugin or DHCP leases (DHCPLSS) plugin.
|
||||
|
||||
**PiHole (Device sync)**
|
||||
|
||||
* `PIHOLE_RUN`: You need to map `:/etc/pihole/pihole-FTL.db` in the `docker-compose.yml` file if you enable this setting.
|
||||
|
||||
**DHCP Leases (Device import)**
|
||||
|
||||
* `DHCPLSS_RUN`: You need to map `:/etc/pihole/dhcp.leases` in the `docker-compose.yml` file if you enable this setting.
|
||||
* The above setting has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry (the path in the container must contain `pihole` as PiHole uses a different format of the `dhcp.leases` file).
|
||||
|
||||
> [!NOTE]
|
||||
> It's recommended to use the same schedule interval for all plugins responsible for discovering new devices.
|
||||
|
||||
### **Common issues**
|
||||
|
||||
💡 Before creating a new issue, please check if a similar issue was [already resolved](https://github.com/jokob-sk/Pi.Alert/issues?q=is%3Aissue+is%3Aclosed).
|
||||
@@ -85,6 +97,8 @@ version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
@@ -111,6 +125,8 @@ Example by [SeimuS](https://github.com/SeimusS).
|
||||
container_name: PiAlert
|
||||
hostname: PiAlert
|
||||
privileged: true
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert:latest
|
||||
environment:
|
||||
- TZ=Europe/Bratislava
|
||||
@@ -132,6 +148,8 @@ version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
@@ -176,6 +194,8 @@ Courtesy of [pbek](https://github.com/pbek). The volume `pialert_db` is used by
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert
|
||||
ports:
|
||||
- "80:20211/tcp"
|
||||
@@ -198,10 +218,19 @@ Big thanks to <a href="https://github.com/Macleykun">@Macleykun</a> for help and
|
||||
<img src="https://avatars.githubusercontent.com/u/26381427?size=50">
|
||||
</a>
|
||||
|
||||
## ☕ Support me
|
||||
## ❤ Support me
|
||||
|
||||
<a href="https://github.com/sponsors/jokob-sk" target="_blank"><img src="https://i.imgur.com/X6p5ACK.png" alt="Sponsor Me on GitHub" style="height: 30px !important;width: 117px !important;" width="150px" ></a>
|
||||
<a href="https://www.buymeacoffee.com/jokobsk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 117px !important;" width="117px" height="30px" ></a>
|
||||
<a href="https://www.patreon.com/user?u=84385063" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" alt="Support me on patreon" style="height: 30px !important;width: 117px !important;" width="117px" ></a>
|
||||
Get:
|
||||
- Regular updates to keep your data and family safe 🔄
|
||||
- Better and more functionality➕
|
||||
- I don't get burned out and the app survives longer🔥🤯
|
||||
- Quicker and better support with issues 🆘
|
||||
- Less grumpy me 😄
|
||||
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
| [](https://github.com/sponsors/jokob-sk) | [](https://www.buymeacoffee.com/jokobsk) | [](https://www.patreon.com/user?u=84385063) |
|
||||
| --- | --- | --- |
|
||||
|
||||
- Bitcoin: `1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM`
|
||||
- Ethereum: `0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7`
|
||||
|
||||
> 📧 Email me at [jokob@duck.com](mailto:jokob@duck.com?subject=PiAlert) if you want to get in touch or if I should add other sponsorship platforms.
|
||||
232
dockerfiles/README_ES.md
Executable file
232
dockerfiles/README_ES.md
Executable file
@@ -0,0 +1,232 @@
|
||||
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker_prod.yml)
|
||||
[](https://github.com/jokob-sk/Pi.Alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
|
||||
# 🐳 Una imagen docker para Pi.Alert
|
||||
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Instrucciones para Docker](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [Todos los Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
|
||||
<a href="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" width="300px" />
|
||||
</a>
|
||||
<a href="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/network.png" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/network.png" width="300px" />
|
||||
</a>
|
||||
|
||||
|
||||
## 📕 Uso básico
|
||||
|
||||
- Tendrás que ejecutar el contenedor en la red del host, por ejemplo:
|
||||
|
||||
```yaml
|
||||
docker run -d --rm --network=host \
|
||||
-v local/path/pialert/config:/home/pi/pialert/config \
|
||||
-v local/path/pialert/db:/home/pi/pialert/db \
|
||||
-e TZ=Europe/Berlin \
|
||||
-e PORT=20211 \
|
||||
jokobsk/pi.alert:latest
|
||||
```
|
||||
- El escaneo inicial puede tardar hasta 15 minutos (con 50 dispositivos y MQTT). Los siguientes pueden durar entre 3 y 5 minutos, así que espere a que se ejecuten todos los escaneos.
|
||||
|
||||
### Variables de entorno Docker
|
||||
|
||||
| Variable | Descripción | Predeterminado |
|
||||
| :------------- |:-------------| -----:|
|
||||
| `PORT` |Puerto de la interfaz web | `20211` |
|
||||
|`TZ` |Zona horaria para mostrar correctamente las estadísticas. Encuentre su zona horaria [aquí](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `Europe/Berlin` |
|
||||
|`HOST_USER_GID` |ID de usuario (UID) para asignar el usuario del contenedor a un usuario del servidor con suficientes permisos de lectura y escritura en los archivos asignados | `1000` |
|
||||
|`HOST_USER_ID` |ID de grupo de usuarios (GID) para asignar el grupo de usuarios del contenedor a un grupo de usuarios del servidor con suficientes permisos de lectura y escritura en los archivos asignados | `1000` |
|
||||
|
||||
### Rutas Docker
|
||||
|
||||
| | Ruta | Descripción |
|
||||
| :------------- | :------------- |:-------------|
|
||||
| **Obligatorio** | `:/home/pi/pialert/config` | Carpeta que contendrá el archivo `pialert.conf` (para más detalles, véase más abajo) |
|
||||
| **Obligatorio** | `:/home/pi/pialert/db` | Carpeta que contendrá el archivo `pialert.db` |
|
||||
|Opcional| `:/home/pi/pialert/front/log` | Carpeta de registros útil para depurar si tiene problemas al configurar el contenedor |
|
||||
|Opcional| `:/etc/pihole/pihole-FTL.db` | Archivo de base de datos `pihole-FTL.db` de PiHole. Necesario si desea utilizar PiHole |
|
||||
|Opcional| `:/etc/pihole/dhcp.leases` | Archivo `dhcp.leases` de PiHole. Obligatorio si desea utilizar el archivo `dhcp.leases` de PiHole. Tiene que coincidir con la correspondiente entrada de configuración `DHCPLSS_paths_to_check`. (La ruta en el contenedor debe contener `pihole`)|
|
||||
|Opcional| `:/home/pi/pialert/front/api` | Una simple [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) que contiene archivos json estáticos (pero actualizados regularmente) y otros archivos. |
|
||||
|
||||
|
||||
### Configurar (`pialert.conf`)
|
||||
|
||||
- Si no está disponible, la aplicación genera un archivo `pialert.conf` y `pialert.db` por defecto en la primera ejecución.
|
||||
- La forma preferida es gestionar la configuración a través de la sección "Configuración" de la interfaz de usuario.
|
||||
- Puede modificar [pialert.conf](https://github.com/jokob-sk/Pi.Alert/tree/main/config) directamente, si es necesario.
|
||||
|
||||
#### Ajustes importantes
|
||||
|
||||
Estos son los ajustes más importantes para obtener al menos alguna salida en la pantalla de tus Dispositivos. Por lo general, sólo se utiliza un enfoque, pero usted debe ser capaz de combinar estos enfoques.
|
||||
|
||||
##### Para arp-scan: ARPSCAN_RUN, SCAN_SUBNETS
|
||||
|
||||
- ❗ Para usar el método arp-scan, necesitas configurar la variable `SCAN_SUBNETS`. Consulte la documentación sobre cómo [configurar SUBNETS, VLANs y limitaciones](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md)
|
||||
|
||||
##### Para pihole: PIHOLE_RUN, DHCPLSS_RUN
|
||||
|
||||
Hay dos maneras de importar dispositivos PiHole. A través del plugin de importación PiHole (PIHOLE) o del plugin DHCP leases (DHCPLSS).
|
||||
|
||||
**PiHole (Sincronización de dispositivos)**
|
||||
|
||||
* `PIHOLE_RUN`: Necesitas mapear `:/etc/pihole/pihole-FTL.db` en el fichero `docker-compose.yml` si activas esta opción.
|
||||
|
||||
**DHCP Leases (Importación de dispositivos)**
|
||||
|
||||
* `DHCPLSS_RUN`: Es necesario mapear `:/etc/pihole/dhcp.leases` en el fichero `docker-compose.yml` si se activa esta opción.
|
||||
* La configuración anterior tiene que coincidir con una entrada de configuración correspondiente `DHCPLSS_paths_to_check` (la ruta en el contenedor debe contener `pihole` ya que PiHole utiliza un formato diferente del archivo `dhcp.leases`).
|
||||
|
||||
> Se recomienda utilizar el mismo intervalo de programación para todos los plugins responsables de descubrir nuevos dispositivos.
|
||||
|
||||
### **Problemas comunes**
|
||||
|
||||
💡 Antes de crear una nueva incidencia, comprueba si ya se ha resuelto una [incidencia similar](https://github.com/jokob-sk/Pi.Alert/issues?q=is%3Aissue+is%3Aclosed).
|
||||
|
||||
⚠ Compruebe también los problemas comunes y los [consejos de depuración](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEBUG_TIPS.md).
|
||||
|
||||
## 📄 Ejemplos
|
||||
|
||||
### Ejemplo 1
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/pialert/config:/home/pi/pialert/config
|
||||
- local/path/pialert/db:/home/pi/pialert/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/home/pi/pialert/front/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- HOST_USER_ID=1000
|
||||
- HOST_USER_GID=1000
|
||||
- PORT=20211
|
||||
```
|
||||
|
||||
Para ejecutar el contenedor ejecute: `sudo docker-compose up -d`
|
||||
|
||||
### Ejemplo 2
|
||||
|
||||
Ejemplo de [SeimuS](https://github.com/SeimusS).
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
container_name: PiAlert
|
||||
hostname: PiAlert
|
||||
privileged: true
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert:latest
|
||||
environment:
|
||||
- TZ=Europe/Bratislava
|
||||
restart: always
|
||||
volumes:
|
||||
- ./pialert/pialert_db:/home/pi/pialert/db
|
||||
- ./pialert/pialert_config:/home/pi/pialert/config
|
||||
network_mode: host
|
||||
```
|
||||
|
||||
Para ejecutar el contenedor ejecute: `sudo docker-compose up -d`
|
||||
|
||||
### Ejemplo 3
|
||||
|
||||
`docker-compose.yml`
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||
- ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- ${LOGS_LOCATION}:/home/pi/pialert/front/log
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
- HOST_USER_ID=${HOST_USER_ID}
|
||||
- HOST_USER_GID=${HOST_USER_GID}
|
||||
- PORT=${PORT}
|
||||
```
|
||||
|
||||
`.env` file
|
||||
|
||||
```yaml
|
||||
#VARIABLES DE RUTA GLOBAL
|
||||
|
||||
APP_DATA_LOCATION=/path/to/docker_appdata
|
||||
APP_CONFIG_LOCATION=/path/to/docker_config
|
||||
LOGS_LOCATION=/path/to/docker_logs
|
||||
|
||||
#VARIABLES DE ENTORNO
|
||||
|
||||
TZ=Europe/Paris
|
||||
HOST_USER_ID=1000
|
||||
HOST_USER_GID=1000
|
||||
PORT=20211
|
||||
|
||||
#VARIABLES DE DESARROLLO
|
||||
|
||||
DEV_LOCATION=/path/to/local/source/code
|
||||
```
|
||||
|
||||
Para ejecutar el contenedor ejecute: `sudo docker-compose --env-file /path/to/.env up`
|
||||
|
||||
### Example 4
|
||||
|
||||
Por cortesía de [pbek](https://github.com/pbek). El volumen `pialert_db` es utilizado por el directorio db. Los dos archivos de configuración se montan directamente desde una carpeta local a sus lugares en la carpeta config. Puedes hacer una copia de seguridad de la carpeta `docker-compose.yaml` y de la carpeta docker volumes.
|
||||
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert
|
||||
ports:
|
||||
- "80:20211/tcp"
|
||||
environment:
|
||||
- TZ=Europe/Vienna
|
||||
networks:
|
||||
local:
|
||||
ipv4_address: 192.168.1.2
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- pialert_db:/home/pi/pialert/db
|
||||
- ./pialert/pialert.conf:/home/pi/pialert/config/pialert.conf
|
||||
```
|
||||
|
||||
## 🏅 Reconocimientos
|
||||
|
||||
Muchas gracias a <a href="https://github.com/Macleykun">@Macleykun</a> por ayudarme en consejos y trucos para Dockerfile(s):
|
||||
|
||||
<a href="https://github.com/Macleykun">
|
||||
<img src="https://avatars.githubusercontent.com/u/26381427?size=50">
|
||||
</a>
|
||||
|
||||
Muchas gracias a <a href="https://github.com/cvc90">@cvc90</a> por ayudarme y realizar esta traduccion:
|
||||
|
||||
<a href="https://github.com/cvc90">
|
||||
<img src="https://avatars.githubusercontent.com/u/76731844?size=50">
|
||||
</a>
|
||||
|
||||
## ☕ Apóyame
|
||||
|
||||
<a href="https://github.com/sponsors/jokob-sk" target="_blank"><img src="https://i.imgur.com/X6p5ACK.png" alt="Sponsor Me on GitHub" style="height: 30px !important;width: 117px !important;" width="150px" ></a>
|
||||
<a href="https://www.buymeacoffee.com/jokobsk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 117px !important;" width="117px" height="30px" ></a>
|
||||
<a href="https://www.patreon.com/user?u=84385063" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" alt="Support me on patreon" style="height: 30px !important;width: 117px !important;" width="117px" ></a>
|
||||
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
@@ -5,7 +5,7 @@ PiAlert comes with a simple API. These API endpoints are static files, that are
|
||||
|
||||
### When are the endpoints updated
|
||||
|
||||
Once you enable the API (`ENABLE_API` setting), the endpoints are updated when objects in the API endpoints are changed:
|
||||
The endpoints are updated when objects in the API endpoints are changed.
|
||||
|
||||
### Location of the endpoints
|
||||
|
||||
@@ -20,8 +20,7 @@ You can access the following files:
|
||||
| `notification_text.txt` | The plain text version of the last notification. |
|
||||
| `notification_text.html` | The full HTML of the last email notification. |
|
||||
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json)). |
|
||||
| `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
|
||||
| `table_nmap_scan.json` | The current state of the discovered ports by the regular NMAP scans. |
|
||||
| `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
|
||||
| `table_pholus_scan.json` | The latest state of the [pholus](https://github.com/jokob-sk/Pi.Alert/tree/main/pholus) (A multicast DNS and DNS Service Discovery Security Assessment Tool) scan results. |
|
||||
| `table_plugins_events.json` | The list of the unprocessed (pending) notification events (plugins_events DB table). |
|
||||
| `table_plugins_history.json` | The list of notification events history. |
|
||||
@@ -29,6 +28,7 @@ You can access the following files:
|
||||
| `language_strings.json` | The content of the language_strings table, which in turn is loaded from the plugins `config.json` definitions. |
|
||||
| `table_custom_endpoint.json` | A custom endpoint generated by the SQL query specified by the `API_CUSTOM_SQL` setting. |
|
||||
| `table_settings.json` | The content of the settings table. |
|
||||
| `app_state.json` | Contains the current application state. |
|
||||
|
||||
Current/latest state of the aforementioned files depends on your settings.
|
||||
|
||||
|
||||
@@ -10,19 +10,15 @@
|
||||
| Table name | Description | Sample data |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| CurrentScan | Result of the current scan | ![Screen1][screen1] |
|
||||
| Devices | The main devices database that also contains the Network tree mappings. If `ScanCycle` is set to `0` device is not scanned. | ![Screen2][screen2] |
|
||||
| DHCP_Leases | Used for importing devices from DHCP_Leases files. Also leveraged by some plugins. | ![Screen3][screen3] |
|
||||
| Events | Used to collect connection/disconnection events. | ![Screen4][screen4] |
|
||||
| Nmap_Scan | Contains results of the scheduled Nmap scan, that is also displayed in the Nmap tab on each device. | ![Screen5][screen5] |
|
||||
| Devices | The main devices database that also contains the Network tree mappings. If `ScanCycle` is set to `0` device is not scanned. | ![Screen2][screen2] |
|
||||
| Events | Used to collect connection/disconnection events. | ![Screen4][screen4] |
|
||||
| Online_History | Used to display the `Device presence over time` chart | ![Screen6][screen6] |
|
||||
| Parameters | Used to pass values between the frontend and backend. | ![Screen7][screen7] |
|
||||
| Pholus_Scan | Scan results of the Pholus python network penetration script. | ![Screen8][screen8] |
|
||||
| PiHole_Network | Table to copy the devices from the PiHole database | ![Screen9][screen9] |
|
||||
| Pholus_Scan | Scan results of the Pholus python network penetration script. | ![Screen8][screen8] |
|
||||
| Plugins_Events | For capturing events exposed by a plugin via the `last_result.log` file. If unique then saved into the `Plugins_Objects` table. Entries are deleted once processed and stored in the `Plugins_History` and/or `Plugins_Objects` tables. | ![Screen10][screen10] |
|
||||
| Plugins_History | History of all entries from the `Plugins_Events` table | ![Screen11][screen11] |
|
||||
| Plugins_Language_Strings | Language strings colelcted from the plugin `config.json` files used for string resolution in the frontend. | ![Screen12][screen12] |
|
||||
| Plugins_Objects | Unique objects detected by individual plugins. | ![Screen13][screen13] |
|
||||
| ScanCycles | (obsolete) Used to determine and identify different scan cycles. | ![Screen14][screen14] |
|
||||
| Sessions | Used to display sessions in the charts | ![Screen15][screen15] |
|
||||
| Settings | Database representation of the sum of all settings from `pialert.conf` and plugins coming from `config.json` files. | ![Screen16][screen16] |
|
||||
|
||||
@@ -30,18 +26,14 @@
|
||||
|
||||
[screen1]: /docs/img/DATABASE/CurrentScan.png
|
||||
[screen2]: /docs/img/DATABASE/Devices.png
|
||||
[screen3]: /docs/img/DATABASE/DHCP_Leases.png
|
||||
[screen4]: /docs/img/DATABASE/Events.png
|
||||
[screen5]: /docs/img/DATABASE/Nmap_Scan.png
|
||||
[screen4]: /docs/img/DATABASE/Events.png
|
||||
[screen6]: /docs/img/DATABASE/Online_History.png
|
||||
[screen7]: /docs/img/DATABASE/Parameters.png
|
||||
[screen8]: /docs/img/DATABASE/Pholus_Scan.png
|
||||
[screen9]: /docs/img/DATABASE/PiHole_Network.png
|
||||
[screen8]: /docs/img/DATABASE/Pholus_Scan.png
|
||||
[screen10]: /docs/img/DATABASE/Plugins_Events.png
|
||||
[screen11]: /docs/img/DATABASE/Plugins_History.png
|
||||
[screen12]: /docs/img/DATABASE/Plugins_Language_Strings.png
|
||||
[screen13]: /docs/img/DATABASE/Plugins_Objects.png
|
||||
[screen14]: /docs/img/DATABASE/ScanCycles.png
|
||||
[screen13]: /docs/img/DATABASE/Plugins_Objects.png
|
||||
[screen15]: /docs/img/DATABASE/Sessions.png
|
||||
[screen16]: /docs/img/DATABASE/Settings.png
|
||||
|
||||
|
||||
24
docs/DEVICES_BULK_EDITING.md
Executable file
24
docs/DEVICES_BULK_EDITING.md
Executable file
@@ -0,0 +1,24 @@
|
||||
# 📝Bulk-edit devices via CSV Export/Import
|
||||
|
||||
> [!NOTE]
|
||||
> As always, backup everything, just in case.
|
||||
|
||||
1. In `Maintenance` > `Backup / Restore` click the `CSV Export` button.
|
||||
2. A `devices.csv` is generated in the `/config` folder
|
||||
3. Edit the `devices.csv` file however you like.
|
||||
|
||||

|
||||
|
||||
> [!NOTE]
|
||||
> The file containing a list of Devices including the Network relationships between Network Nodes and connected devices. You can also trigger this by acessing this URL: `<your pialert url>/php/server/devices.php?action=ExportCSV` or via the `CSV Backup` plugin. (💡 You can schedule this)
|
||||
|
||||

|
||||
|
||||
> [!NOTE]
|
||||
> Keep Linux line endings (sugegsted editors: Nano, Notepad++)
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,11 @@ To edit device information:
|
||||
- Press the "Save" button
|
||||
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> [Bulk-edit devices](/docs/DEVICES_BULK_EDITING.md) by using the `CSV Export` functionality in the `Maintenance` section.
|
||||
|
||||
|
||||
![Device Details][screen1]
|
||||
|
||||
|
||||
|
||||
46
docs/FRONTEND_DEVELOPMENT.md
Executable file
46
docs/FRONTEND_DEVELOPMENT.md
Executable file
@@ -0,0 +1,46 @@
|
||||
# 🖼 Frontend development
|
||||
|
||||
This page contains tips for frontend development when extending PiAlert. Guiding principles are:
|
||||
|
||||
1. Maintainability
|
||||
2. Extendability
|
||||
3. Reusability
|
||||
4. Placing more functionality into Plugins and enhancing core Plugins functionality
|
||||
|
||||
That means that, when writing code, focus on reusing what's available instead of writing quick fixes. Or creating reusable functions, instead of bespoke functionaility.
|
||||
|
||||
## 🔍 Examples
|
||||
|
||||
Some examples how to apply the above:
|
||||
|
||||
> Example 1
|
||||
>
|
||||
> I want to implement a scan fucntion. Options would be:
|
||||
>
|
||||
> 1. To add a manual scan functionality to the `deviceDetails.php` page.
|
||||
> 2. To create a separate page that handles the execution of the scan.
|
||||
> 3. To create a configurable Plugin.
|
||||
>
|
||||
> From the above, number 3 would be the most appropriate solution. Then followed by number 2. Number 1 would be approved only in special circumstances.
|
||||
|
||||
> Example 2
|
||||
>
|
||||
> I want to change the behavior of the application. Options to implement this could be:
|
||||
>
|
||||
> 1. Hard-code the changes in the code.
|
||||
> 2. Implement the changes and add settings to influence the behavior in the `initialize.py` file so the user can adjust these.
|
||||
> 3. Implement the changes and add settings via a setting-only plugin.
|
||||
> 4. Implement the changes in a way so the behavior can be toggled on each plugin so the core capabilities of Plugins get extended.
|
||||
>
|
||||
> From the above, number 4 would be the most appropriate solution. Then followed by number 3. Number 1 or 2 would be approved only in special circumstances.
|
||||
|
||||
## 💡 Frontend tips
|
||||
|
||||
Some useful frontend JavaScript functions:
|
||||
|
||||
- `getDeviceDataByMacAddress(macAddress, devicesColumn)` - method to retrieve any device data (database column) based on MAC address in the frontend
|
||||
- `getString(string stringKey)` - method to retrieve translated strings in the frontend
|
||||
- `getSetting(string stringKey)` - method to retrieve settings in the frontend
|
||||
|
||||
|
||||
Check the [pialert_common.js](https://github.com/jokob-sk/Pi.Alert/blob/main-2023-06-10/front/js/pialert_common.js) file for more frontend functions.
|
||||
25
docs/HW_INSTALL.md
Normal file
25
docs/HW_INSTALL.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# How to install PiAlert on the server hardware
|
||||
|
||||
To download and install PiAlert on the hardware/server directly use `curl` or `wget` commands.
|
||||
|
||||
> [!NOTE]
|
||||
> This is an Experimental feature 🧪 and it relies on community support.
|
||||
|
||||
PiAlert will be installed in `home/pi/pialert/` and run on port number `20211`.
|
||||
|
||||
## CURL
|
||||
|
||||
```bash
|
||||
curl -o install.sh https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/install/install.sh && sudo chmod +x install.sh && sudo ./install.sh
|
||||
```
|
||||
|
||||
## WGET
|
||||
|
||||
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/install/install.sh -O install.sh && sudo chmod +x install.sh && sudo ./install.sh
|
||||
```
|
||||
|
||||
These commands will download the `install.sh` script from the GitHub repository, make it executable with `chmod`, and then run it using `./install.sh`.
|
||||
|
||||
Make sure you have the necessary permissions to execute the script.
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
Make sure you have a root device with the MAC `Internet` (No other MAC addresses are currently supported as the root node).
|
||||
|
||||
> 💡 Tip: You can add dummy devices via the [Undiscoverables plugin](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/README.md)
|
||||
|
||||
> 💡 Tip: Export your configuration of the Network and Devices once in a while via the Export CSV feature under **Maintenance** -> **Backup/Restore** -> **CSV Export**.
|
||||
|
||||
## ⚡Quick setup:
|
||||
|
||||
* Go to Devices > Device Details.
|
||||
@@ -9,13 +13,18 @@ Make sure you have a root device with the MAC `Internet` (No other MAC addresses
|
||||
* Set the Type of such a device to one of the following: AP, Firewall, Gateway, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN.
|
||||
* Save and go to Network where the devices you've marked as network devices (by selecting the Type as mentioned above) will show up as tabs.
|
||||
* You can now assign the Unassigend devices to the correct network node.
|
||||
* If port is empty or 0 a wifi icon is rendered, otherwise a ethernet port icon
|
||||
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> [Bulk-edit devices](/docs/DEVICES_BULK_EDITING.md) by using the `CSV Export` functionality in the `Maintenance` section. You can use this to fix `Internet` node assignment issues.
|
||||
|
||||
## 🔍Detailed example:
|
||||
|
||||
In this example you will setup a device named `rapberrypi` as a `Switch` in our network.
|
||||
|
||||
### 1) Device details page
|
||||
### 1. Device details page
|
||||
|
||||
- Go to the `Devices` (1) page:
|
||||
|
||||
@@ -24,13 +33,13 @@ In this example you will setup a device named `rapberrypi` as a `Switch` in our
|
||||
- In the (2) `Details` tab navigate to the the `Type` (3) dropdown and select the type `Switch` (4).
|
||||
|
||||
> Note: Only the following device types will show up as selectable Network nodes ( = devices you can connect other devices to):
|
||||
> AP, Firewall, Gateway, Hypervisor, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN.
|
||||
> AP, Firewall, Gateway, Hypervisor, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN. Custom types can be added via the `NETWORK_DEVICE_TYPES` setting.
|
||||
|
||||
- Assign a device to your root device from the `Node` (5) dropdown which has the MAC `Internet` (6) (Your name may differ, but the MAC needs to be set to `Internet` - this is done by default).
|
||||
|
||||
- Save your changes (7)
|
||||
|
||||
### 1) Network page
|
||||
### 2. Network page
|
||||
|
||||
- Navigate to your `Network` (1) page:
|
||||
|
||||
@@ -40,7 +49,7 @@ In this example you will setup a device named `rapberrypi` as a `Switch` in our
|
||||
- As we asssigned the `raspberrypi` in the previous 1) Device details page section to the `Internet` parent network node in step (6), the link is also showing up in the tree diagram (4)
|
||||
- We can now assign the device `(AppleTV)` (5) to this `raspberrypi` node, representing a network Switch in this example
|
||||
|
||||
### 1) Network page with 2 levels
|
||||
### 3. Network page with 2 levels
|
||||
|
||||
- After clicking the `Assign` button in the previous section, the `(AppleTV)` (1) device is now connected to our `raspberrypi` (2).
|
||||
|
||||
@@ -52,3 +61,4 @@ In this example you will setup a device named `rapberrypi` as a `Switch` in our
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,12 +21,11 @@ There is also an in-app Help / FAQ section that should be answering frequently a
|
||||
|
||||
#### 🔝 Popular/Suggested
|
||||
|
||||
- [API endpoints details](/docs/API.md)
|
||||
- [Plugin system details and how to develop your own](/front/plugins/README.md)
|
||||
- [Network treemap configuration](/docs/NETWORK_TREE.md)
|
||||
- [Gmail as SMTP server for sending emails](/docs/SMTP_GMAIL.md)
|
||||
- [SMTP server config](/docs/SMTP.md)
|
||||
- [Subnets and VLANs configuration for arp-scan](/docs/SUBNETS.md)
|
||||
- [Home Assistant](/docs/HOME_ASSISTANT.md)
|
||||
- [Bulk edit devices](/docs/DEVICES_BULK_EDITING.md)
|
||||
|
||||
#### ⚙ System Management
|
||||
|
||||
@@ -40,10 +39,19 @@ There is also an in-app Help / FAQ section that should be answering frequently a
|
||||
|
||||
#### ♻ Misc
|
||||
|
||||
- [New Version notifications](/docs/VERSIONS.md)
|
||||
- [Version history (legacy)](/docs/VERSIONS_HISTORY.md)
|
||||
- [Reverse proxy (Nginx, Apache, SWAG)](/docs/REVERSE_PROXY.md)
|
||||
|
||||
#### 👩💻For Developers👨💻
|
||||
|
||||
- [APP code structure](/pialert/README.md)
|
||||
- [Database structure](/docs/DATABASE.md)
|
||||
- [Reverse proxy with SWAG](/docs/REVERSE_PROXY.md)
|
||||
- [API endpoints details](/docs/API.md)
|
||||
- [Plugin system details and how to develop your own](/front/plugins/README.md)
|
||||
- [Settings system](/docs/SETTINGS_SYSTEM.md)
|
||||
- [New Version notifications](/docs/VERSIONS.md)
|
||||
- [Frontend development tips](/docs/FRONTEND_DEVELOPMENT.md)
|
||||
- [Webhook secrets](/docs/WEBHOOK_SECRET.md)
|
||||
|
||||
Feel free to suggest or submit new docs via a PR.
|
||||
|
||||
|
||||
@@ -1,6 +1,291 @@
|
||||
# Reverse Proxy Configuration
|
||||
|
||||
Reverse proxy example by using LinuxServer's SWAG container.
|
||||
> Submitted by amazing [cvc90](https://github.com/cvc90) 🙏
|
||||
|
||||
## NGINX HTTP Configuration (Direct Path)
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.alert;
|
||||
proxy_preserve_host on;
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at http://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## NGINX HTTP Configuration (Sub Path)
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.alert;
|
||||
proxy_preserve_host on;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at http://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## NGINX HTTP Configuration (Sub Path) with module ngx_http_sub_module
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.alert;
|
||||
proxy_preserve_host on;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter 'href="/' 'href="/pi.alert/';
|
||||
sub_filter '(?>$host)/css' '/pi.alert/css';
|
||||
sub_filter '(?>$host)/js' '/pi.alert/js';
|
||||
sub_filter '/img' '/pi.alert/img';
|
||||
sub_filter '/lib' '/pi.alert/lib';
|
||||
sub_filter '/php' '/pi.alert/php';
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at http://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
**NGINX HTTPS Configuration (Direct Path)**
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443;
|
||||
server_name pi.alert;
|
||||
SSLEngine On;
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem;
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key;
|
||||
proxy_preserve_host on;
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at https://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
**NGINX HTTPS Configuration (Sub Path)**
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443;
|
||||
server_name pi.alert;
|
||||
SSLEngine On;
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem;
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at https://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## NGINX HTTPS Configuration (Sub Path) with module ngx_http_sub_module
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443;
|
||||
server_name pi.alert;
|
||||
SSLEngine On;
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem;
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter 'href="/' 'href="/pi.alert/';
|
||||
sub_filter '(?>$host)/css' '/pi.alert/css';
|
||||
sub_filter '(?>$host)/js' '/pi.alert/js';
|
||||
sub_filter '/img' '/pi.alert/img';
|
||||
sub_filter '/lib' '/pi.alert/lib';
|
||||
sub_filter '/php' '/pi.alert/php';
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at https://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTP Configuration (Direct Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName pi.alert
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at http://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTP Configuration (Sub Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName pi.alert
|
||||
location ^~ /pi.alert/ {
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
}
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at http://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTPS Configuration (Direct Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:443>
|
||||
ServerName pi.alert
|
||||
SSLEngine On
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at https://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTPS Configuration (Sub Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:443>
|
||||
ServerName pi.alert
|
||||
SSLEngine On
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key
|
||||
location ^~ /pi.alert/ {
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
}
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at https://pi.alert/pi.alert/
|
||||
|
||||
## Reverse proxy example by using LinuxServer's SWAG container.
|
||||
|
||||
> Submitted by [s33d1ing](https://github.com/s33d1ing). 🙏
|
||||
|
||||
|
||||
77
docs/SETTINGS_SYSTEM.md
Executable file
77
docs/SETTINGS_SYSTEM.md
Executable file
@@ -0,0 +1,77 @@
|
||||
## ⚙ Setting system
|
||||
|
||||
This is an explanation how settings are handled intended for anyone thinking about writing their own plugin or contributing to the project.
|
||||
|
||||
If you are a user of the app, settings should be described in the `Settings` section of the app. Open an issue if you'd like to clarify any of the settings.
|
||||
|
||||
### 🛢 Data storage
|
||||
|
||||
The source of truth for user-defined values is the `pialert.conf` file. Editing the file makes the App overwrite values in the `Settings` database table and in the `table_settings.json` file.
|
||||
|
||||
#### Settings database table
|
||||
|
||||
The `Settings` database table contains settings for App run purposes. The table is recreated every time the App restarts. The settings are loaded from the source-of-truth, that is the `pialert.conf` file. A high-level overview on the databse structure can be found in the [database documentation](/docs/DATABASE.md).
|
||||
|
||||
#### table_settings.json
|
||||
|
||||
This is the [API endpoint](/docs/API.md) that reflects the state of the `Settings` database table. Settings can be accessed with the:
|
||||
|
||||
* `getSetting(key)` JavaScript method
|
||||
|
||||
The json file is also cached on the client-side local storage of the browser.
|
||||
|
||||
#### pialert.conf
|
||||
|
||||
> [!NOTE]
|
||||
> This is the source of truth for settings. User-defined values in this files always override default values specified in the Plugin definition.
|
||||
|
||||
The App generates two `pialert.conf` entries for every setting (Since version 23.8+). One entry is the setting value, the second is the `__metadata` associated with the setting. This `__metadata` entry contains the full setting definition in JSON format. This should helps the future extensibility of the Settings system.
|
||||
|
||||
#### Plugin settings
|
||||
|
||||
> [!NOTE]
|
||||
> This is the preferred way adding settings going forward. I'll be likely migrating all app settings into plugin-based settings.
|
||||
|
||||
Plugin settings are loaded dynamically from the `config.json` of individual plugins. If a setting isn't defined in the `pialert.conf` file, it is initialized via the `default_value` property of a setting from the `config.json` file. Check the [Plugins documentation](/front/plugins/README.md), section `⚙ Setting object structure` for details on the structure of the setting.
|
||||
|
||||
![Screen 1][screen1]
|
||||
|
||||
### Settings Process flow
|
||||
|
||||
The process flow is mostly managed by the [initialise.py](/pialert/initialise.py) file.
|
||||
|
||||
The script is responsible for reading user-defined values from a configuration file (`pialert.conf`), initializing settings, and importing them into a database. It also handles plugins and their configurations.
|
||||
|
||||
Here's a high-level description of the code:
|
||||
|
||||
1. Function Definitions:
|
||||
- `ccd`: This function is used to handle user-defined settings and configurations. It takes several parameters related to the setting's name, default value, input type, options, group, and more. It saves the settings and their metadata in different lists (`conf.mySettingsSQLsafe` and `conf.mySettings`).
|
||||
|
||||
- `importConfigs`: This function is the main entry point of the script. It imports user settings from a configuration file, processes them, and saves them to the database.
|
||||
|
||||
- `read_config_file`: This function reads the configuration file (`pialert.conf`) and returns a dictionary containing the key-value pairs from the file.
|
||||
|
||||
2. Importing Configuration and Initializing Settings:
|
||||
- The `importConfigs` function starts by checking the modification time of the configuration file to determine if it needs to be re-imported. If the file has not been modified since the last import, the function skips the import process.
|
||||
|
||||
- The function reads the configuration file using the `read_config_file` function, which returns a dictionary of settings.
|
||||
|
||||
- The script then initializes various user-defined settings using the `ccd` function, based on the values read from the configuration file. These settings are categorized into groups such as "General," "Email," "Webhooks," "Apprise," and more.
|
||||
|
||||
3. Plugin Handling:
|
||||
- The script loads and handles plugins dynamically. It retrieves plugin configurations and iterates through each plugin.
|
||||
- For each plugin, it extracts the prefix and settings related to that plugin and processes them similarly to other user-defined settings.
|
||||
- It also handles scheduling for plugins with specific `RUN_SCHD` settings.
|
||||
|
||||
4. Saving Settings to the Database:
|
||||
- The script clears the existing settings in the database and inserts the updated settings into the database using SQL queries.
|
||||
|
||||
5. Updating the API and Performing Cleanup:
|
||||
- After importing the configurations, the script updates the API to reflect the changes in the settings.
|
||||
- It saves the current timestamp to determine the next import time.
|
||||
- Finally, it logs the successful import of the new configuration.
|
||||
|
||||
|
||||
_____________________
|
||||
|
||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_settings.png "Screen 1"
|
||||
41
docs/SMTP.md
Executable file
41
docs/SMTP.md
Executable file
@@ -0,0 +1,41 @@
|
||||
# 📧 SMTP guides
|
||||
|
||||
## Using the GMX SMTP server
|
||||
|
||||
1. Go to your GMX account https://account.gmx.com
|
||||
2. Under Security Options enable 2FA (Two-factor authentication)
|
||||
3. Under Security Options generate an Application-specific password
|
||||
4. Home -> Email Settings -> POP3 & IMAP -> Enable access to this account via POP3 and IMAP
|
||||
5. In PiAlert specify these settings:
|
||||
|
||||
```python
|
||||
REPORT_MAIL=True
|
||||
SMTP_SERVER='mail.gmx.com'
|
||||
SMTP_PORT=465
|
||||
SMTP_USER='gmx_email@gmx.com'
|
||||
SMTP_PASS='<your Application-specific password>'
|
||||
SMTP_SKIP_TLS=True
|
||||
SMTP_FORCE_SSL=True
|
||||
SMTP_SKIP_LOGIN=False
|
||||
REPORT_FROM='gmx_email@gmx.com' # this has to be the same email as in SMTP_USER
|
||||
REPORT_TO='some_target_email@gmail.com'
|
||||
```
|
||||
|
||||
|
||||
## Using the Gmail SMTP server
|
||||
|
||||
1. Create an app password by following the instructions from Google, you need to Enable 2FA for this to work.
|
||||
[https://support.google.com/accounts/answer/185833](https://support.google.com/accounts/answer/185833)
|
||||
|
||||
2. Specify the following settings:
|
||||
|
||||
```python
|
||||
REPORT_MAIL=True
|
||||
SMTP_SKIP_TLS=True
|
||||
SMTP_FORCE_SSL=True
|
||||
SMTP_PORT=465
|
||||
SMTP_SERVER='smtp.gmail.com'
|
||||
SMTP_PASS='16-digit passcode from google'
|
||||
REPORT_TO='some_target_email@gmail.com'
|
||||
```
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
## Use the Gmail SMTP server
|
||||
|
||||
1) Create an app password by following the instructions from Google, you need to Enable 2FA for this to work.
|
||||
[https://support.google.com/accounts/answer/185833](https://support.google.com/accounts/answer/185833)
|
||||
|
||||
2) Specify the following settings:
|
||||
|
||||
```python
|
||||
SMTP_SKIP_TLS=True
|
||||
SMTP_FORCE_SSL=True
|
||||
SMTP_PORT=465
|
||||
SMTP_SERVER='smtp.gmail.com'
|
||||
SMTP_PASS='16-digit passcode from google'
|
||||
```
|
||||
|
||||
@@ -35,6 +35,54 @@ The adapter will probably be `eth0` or `eth1`. (Run `iwconfig` in the container
|
||||
|
||||
- Append e.g.: ` -vlan=107` to the interface field (e.g.: `eth0 -vlan=107`) for multiple vlans. More details in this [comment in this issue](https://github.com/jokob-sk/Pi.Alert/issues/170#issuecomment-1419902988)
|
||||
|
||||
|
||||
#### VLANs on a Hyper-V setup
|
||||
|
||||
> Community sourced content by [mscreations](https://github.com/mscreations) from this [discussion](https://github.com/jokob-sk/Pi.Alert/discussions/404).
|
||||
|
||||
> [!NOTE]
|
||||
> The setup this was tested on: Bare Metal -> Hyper-V on Win Server 2019 -> Ubuntu 22.04 VM -> Docker -> PiAlert.
|
||||
|
||||
**Approach 1 (may cause issues):**
|
||||
|
||||
Configure multiple network adapters in Hyper-V with distinct VLANs connected to each one using Hyper-V's network setup. However, this action can potentially lead to the Docker host's inability to handle network traffic correctly. The issue may stem from the creation of routes for network time servers or domain controllers on every interface, thereby preventing proper synchronization of the underlying Ubuntu VM. This interference can affect the performance of other applications such as Authentik.
|
||||
|
||||
**Approach 2 (working example)**
|
||||
|
||||
Network connections to switches are configured as trunk and allow all VLANs access to the server.
|
||||
|
||||
By default Hyper-V only allows untagged packets through to the VM interface and no VLAN tagged packets get through. In order to fix this follow these steps:
|
||||
|
||||
1) Run the following command in Powershell on the Hyper-V machine:
|
||||
|
||||
```shell
|
||||
Set-VMNetworkAdapterVlan -VMName <Docker VM Name> -Trunk -NativeVlanId 0 -AllowedVlanIdList "<comma separated list of vlans>"
|
||||
```
|
||||
|
||||
(There might be other ways how adjust this.)
|
||||
|
||||
2) Within the VM, set up sub-interfaces for each of the VLANs so they can be scanned. On Ubuntu 22.04 Netplan can be used.
|
||||
|
||||
In /etc/netplan/00-installer-config.yaml, add vlan definitions:
|
||||
|
||||
```
|
||||
network:
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: yes
|
||||
vlans:
|
||||
eth0.2:
|
||||
id: 2
|
||||
link: eth0
|
||||
addresses: [ "192.168.2.2/24" ]
|
||||
routes:
|
||||
- to: 192.168.2.0/24
|
||||
via: 192.168.1.1
|
||||
```
|
||||
|
||||
3) Run `sudo netplan apply` and the interfaces are then available to scan in PiAlert.
|
||||
4) In this case, use `192.168.2.0/24 --interface=eth0.2` in PiAlert
|
||||
|
||||
#### VLAN 🔍Example:
|
||||
|
||||

|
||||
|
||||
38
docs/WEBHOOK_SECRET.md
Executable file
38
docs/WEBHOOK_SECRET.md
Executable file
@@ -0,0 +1,38 @@
|
||||
# Webhook Secrets
|
||||
|
||||
## How does the signing work?
|
||||
|
||||
Pi.Alert will use the configured secret to create a hash signature of the request body. This SHA256-HMAC signature will appear in the `X-Webhook-Signature` header of each request to the webhook target URL. You can use the value of this header to validate the request was sent by Pi.Alert.
|
||||
|
||||
## Activating webhook signatures
|
||||
|
||||
All you need to do in order to add a signature to the request headers is to set the `WEBHOOK_SECRET` config value to a non-empty string.
|
||||
|
||||
## Validating webhook deliveries
|
||||
|
||||
There are a few things to keep in mind when validating the webhook delivery:
|
||||
|
||||
- Pi.Alert uses an HMAC hex digest to compute the hash
|
||||
- The signature in the `X-Webhook-Signature` header always starts with `sha256=`
|
||||
- The hash signature is generated using the configured `WEBHOOK_SECRET` and the request body.
|
||||
- Never use a plain `==` operator. Instead, consider using a method like [`secure_compare`](https://www.rubydoc.info/gems/rack/Rack%2FUtils:secure_compare) or [`crypto.timingSafeEqual`](https://nodejs.org/api/crypto.html#cryptotimingsafeequala-b), which performs a "constant time" string comparison to help mitigate certain timing attacks against regular equality operators, or regular loops in JIT-optimized languages.
|
||||
|
||||
## Testing the webhook payload validation
|
||||
|
||||
You can use the following secret and payload to verify that your implementation is working correctly.
|
||||
|
||||
`secret`: 'this is my secret'
|
||||
|
||||
`payload`: '{"test":"this is a test body"}'
|
||||
|
||||
If your implementation is correct, the signature you generated should match the following:
|
||||
|
||||
`signature`: bed21fcc34f98e94fd71c7edb75e51a544b4a3b38b069ebaaeb19bf4be8147e9
|
||||
|
||||
`X-Webhook-Signature`: sha256=bed21fcc34f98e94fd71c7edb75e51a544b4a3b38b069ebaaeb19bf4be8147e9
|
||||
|
||||
## More information
|
||||
|
||||
If you want to learn more about webhook security, take a look at [GitHub's webhook documentation](https://docs.github.com/en/webhooks/about-webhooks).
|
||||
|
||||
You can find examples for validating a webhook delivery [here](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries#examples).
|
||||
BIN
docs/img/DEVICES_BULK_EDITING/CSV_BACKUP_SETTINGS.png
Executable file
BIN
docs/img/DEVICES_BULK_EDITING/CSV_BACKUP_SETTINGS.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 131 KiB |
BIN
docs/img/DEVICES_BULK_EDITING/MAINTENANCE_CSV_EXPORT.png
Executable file
BIN
docs/img/DEVICES_BULK_EDITING/MAINTENANCE_CSV_EXPORT.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
BIN
docs/img/DEVICES_BULK_EDITING/NOTEPAD++.png
Executable file
BIN
docs/img/DEVICES_BULK_EDITING/NOTEPAD++.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
docs/img/plugins_device_details.png
Executable file
BIN
docs/img/plugins_device_details.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 202 KiB |
BIN
docs/img/plugins_rogue_dhcp.png
Executable file
BIN
docs/img/plugins_rogue_dhcp.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
@@ -459,35 +459,7 @@
|
||||
border-right: 5px solid #606060;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Spin
|
||||
----------------------------------------------------------------------------- */
|
||||
.pa_semitransparent-panel {
|
||||
position: absolute;
|
||||
width: 100%; /*calc (100% -40px);*/
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
|
||||
opacity: 0.8;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.pa_spinner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 15px;
|
||||
width: 200px;
|
||||
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Notification float banner
|
||||
@@ -646,6 +618,11 @@ height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.settingswrap .metadata
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table_row {
|
||||
padding: 3px;
|
||||
width:100%;
|
||||
@@ -693,6 +670,8 @@ height: 50px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
/* Settings */
|
||||
|
||||
.settings_content {
|
||||
padding: 10px;
|
||||
/* background-color: #272c30; */
|
||||
@@ -715,6 +694,28 @@ height: 50px;
|
||||
width: auto
|
||||
}
|
||||
|
||||
.override{
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.override .override-text
|
||||
{
|
||||
float:left;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.override .override-check
|
||||
{
|
||||
float:left;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
input[readonly] {
|
||||
/* Apply styles to the readonly input */
|
||||
background-color: #646566 !important;
|
||||
color: #000;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Devices */
|
||||
.drp-edit
|
||||
@@ -735,6 +736,15 @@ height: 50px;
|
||||
{
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.drag
|
||||
{
|
||||
cursor: move; /* fallback if grab cursor is unsupported */
|
||||
cursor: grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: -webkit-grab;
|
||||
}
|
||||
|
||||
.db_info_table_row .select2-container--default .select2-selection--multiple .select2-selection__choice
|
||||
{
|
||||
background-color:#258744;
|
||||
@@ -761,31 +771,46 @@ height: 50px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* NETWORK page */
|
||||
|
||||
/* AdminLTE overrides */
|
||||
#networkTree .box
|
||||
{
|
||||
padding:2px;
|
||||
margin:2px;
|
||||
border-top:1px;
|
||||
border-top-color:grey;
|
||||
padding:0px;
|
||||
padding-top:6px;
|
||||
margin:0px;
|
||||
align-items:center;
|
||||
border-radius:20px;
|
||||
width:180px;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
}
|
||||
#networkTree .netNodeText
|
||||
{
|
||||
top: 2px;
|
||||
margin: 2px;
|
||||
{
|
||||
position: absolute;
|
||||
}
|
||||
#networkTree .netPort
|
||||
{
|
||||
width: 8px;;
|
||||
float:left;
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#networkTree .portBckgIcon
|
||||
{
|
||||
opacity: 0.3;
|
||||
display: initial;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#networkTree
|
||||
{
|
||||
margin-left: 16px;
|
||||
/* border: solid;
|
||||
border-color:#606060; */
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
position: relative;
|
||||
}
|
||||
#networkTree .netIcon
|
||||
{
|
||||
@@ -797,7 +822,7 @@ height: 50px;
|
||||
{
|
||||
display: block;
|
||||
position: absolute;
|
||||
margin-left: 156px;
|
||||
margin-left: 170px;
|
||||
top: -3px;
|
||||
font-size: large;
|
||||
left: -15px;
|
||||
@@ -854,4 +879,81 @@ height: 50px;
|
||||
{
|
||||
width:480px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*Hidden special button*/
|
||||
|
||||
@media (max-width: 464px) {
|
||||
#back-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 432px) {
|
||||
#next-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
#reload-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 365px) {
|
||||
#fullscreen-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Spin
|
||||
----------------------------------------------------------------------------- */
|
||||
.pa_semitransparent-panel {
|
||||
position: absolute;
|
||||
width: 100%; /*calc (100% -40px);*/
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
|
||||
opacity: 0.8;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.pa_spinner {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 100px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 15px;
|
||||
width: 200px;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#loadingSpinner
|
||||
{
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Donations
|
||||
----------------------------------------------------------------------------- */
|
||||
.donations .box
|
||||
{
|
||||
padding:15px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.donations .box-header
|
||||
{
|
||||
color:15px;
|
||||
}
|
||||
.donations h3
|
||||
{
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# deviceDetails.php - Front module. Device management page
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# deviceDetails.php - Front module. Device management page #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<?php
|
||||
require 'php/templates/header.php';
|
||||
@@ -94,20 +99,14 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-sm-12 col-xs-12">
|
||||
<!-- <div class="box-transparent"> -->
|
||||
|
||||
|
||||
<div id="navDevice" class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs" style="fon t-size:16px;">
|
||||
<li> <a id="tabDetails" href="#panDetails" data-toggle="tab"> <?= lang('DevDetail_Tab_Details');?> </a></li>
|
||||
<?php
|
||||
if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $DevDetail_Tap_temp = lang('DevDetail_Tab_Nmap');}
|
||||
?>
|
||||
<li> <a id="tabNmap" href="#panNmap" data-toggle="tab"> <?php echo $DevDetail_Tap_temp;?> </a></li>
|
||||
<li> <a id="tabTools" href="#panTools" data-toggle="tab"> <?= lang('DevDetail_Tab_Tools');?> </a></li>
|
||||
<li> <a id="tabSessions" href="#panSessions" data-toggle="tab"> <?= lang('DevDetail_Tab_Sessions');?> </a></li>
|
||||
<li> <a id="tabPresence" href="#panPresence" data-toggle="tab"> <?= lang('DevDetail_Tab_Presence');?> </a></li>
|
||||
<li> <a id="tabEvents" href="#panEvents" data-toggle="tab"> <?= lang('DevDetail_Tab_Events');?> </a></li>
|
||||
<li> <a id="tabPholus" href="#panPholus" data-toggle="tab"> <?= lang('DevDetail_Tab_Pholus');?> </a></li>
|
||||
<li> <a id="tabPlugins" href="#panPlugins" data-toggle="tab"> <?= lang('DevDetail_Tab_Plugins');?> </a></li>
|
||||
<li> <a id="tabEvents" href="#panEvents" data-toggle="tab"> <?= lang('DevDetail_Tab_Events');?> </a></li>
|
||||
<li> <a id="tabPlugins" href="#panPlugins" data-toggle="tab"> <?= lang('DevDetail_Tab_Plugins');?> </a></li>
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default" style="padding: 10px; min-width: 30px;"
|
||||
@@ -120,9 +119,7 @@
|
||||
id="btnNext" onclick="recordSwitch('next')"> <i class="fa fa-chevron-right"></i> </button>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-content" style="min-height: 430px;">
|
||||
|
||||
<!-- tab page 1 ------------------------------------------------------------ -->
|
||||
@@ -157,7 +154,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Owner -->
|
||||
<div class="form-group">
|
||||
<div class="form-group" title="<?= lang('DevDetail_Owner_hover');?>">
|
||||
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Owner');?></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
@@ -174,7 +171,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="form-group">
|
||||
<div class="form-group" title="<?= lang('DevDetail_Type_hover');?>">
|
||||
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Type');?></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
@@ -192,14 +189,14 @@
|
||||
</div>
|
||||
|
||||
<!-- Icon -->
|
||||
<div class="form-group">
|
||||
<div class="form-group" title="<?= lang('DevDetail_Icon_Descr');?>">
|
||||
<label class="col-sm-3 control-label">
|
||||
<?= lang('DevDetail_Icon');?>
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/ICONS.md" target="_blank"> <span><i class="fa fa-circle-question"></i></a><span>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input class="form-control" title="<?= lang('DevDetail_Icon_Descr');?>" id="txtIcon" type="text" value="--">
|
||||
<input class="form-control" id="txtIcon" type="text" value="--">
|
||||
<span class="input-group-addon" title='<?= lang('DevDetail_button_OverwriteIcons_Tooltip');?>'><i class="fa fa-copy pointer" onclick="askOverwriteIconType();"></i></span>
|
||||
<span class="input-group-addon"><i class="fa fa-pencil pointer" onclick="editDrp('txtIcon');"></i></span>
|
||||
<div class="input-group-btn">
|
||||
@@ -214,7 +211,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<div class="form-group">
|
||||
<div class="form-group" title="<?= lang('DevDetail_Vendor_hover');?>">
|
||||
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Vendor');?></label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" id="txtVendor" type="text" value="--">
|
||||
@@ -325,7 +322,7 @@
|
||||
|
||||
<!-- Network -->
|
||||
<h4 class="bottom-border-aqua"><?= lang('DevDetail_MainInfo_Network_Title');?><span class="networkPageHelp"> <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span></h4>
|
||||
<div class="form-group">
|
||||
<div class="form-group" title="<?= lang('DevDetail_Network_Node_hover');?>">
|
||||
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Network');?></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
@@ -342,7 +339,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group" title="<?= lang('DevDetail_Network_Port_hover');?>">
|
||||
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Network_Port');?></label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" id="txtNetworkPort" type="text" value="--">
|
||||
@@ -431,7 +428,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Randomized MAC -->
|
||||
<div class="form-group" >
|
||||
<div class="form-group" title="<?= lang('RandomMAC_hover');?>" >
|
||||
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_RandomMAC');?>:</label>
|
||||
<div class="col-sm-7" style="padding-top:6px;">
|
||||
<span id="iconRandomMACinactive" data-toggle="tooltip" data-placement="right" title="Random MAC is Inactive">
|
||||
@@ -530,126 +527,20 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- tab page "Tools" ------------------------------------------------------------ -->
|
||||
|
||||
<!-- tab page 5 ------------------------------------------------------------ -->
|
||||
<div class="tab-pane fade" id="panTools">
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="panNmap">
|
||||
|
||||
<?php
|
||||
if ($_REQUEST['mac'] == 'Internet') {
|
||||
?>
|
||||
<h4 class="">Online Speedtest</h4>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">Start Speedtest</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function speedtestcli() {
|
||||
$( "#scanoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/speedtestcli.php",
|
||||
beforeSend: function() { $('#scanoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#scanoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#scanoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<h4 class="">Nmap Scans</h4>
|
||||
<div style="width:100%; text-align: center;">
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
document.getElementById('piamanualnmap_fast').innerHTML='<?= lang('DevDetail_Nmap_buttonFast');?> (' + document.getElementById('txtLastIP').value +')';
|
||||
document.getElementById('piamanualnmap_normal').innerHTML='<?= lang('DevDetail_Nmap_buttonDefault');?> (' + document.getElementById('txtLastIP').value +')';
|
||||
document.getElementById('piamanualnmap_detail').innerHTML='<?= lang('DevDetail_Nmap_buttonDetail');?> (' + document.getElementById('txtLastIP').value +')';
|
||||
document.getElementById('piamanualnmap_skipdiscovery').innerHTML='<?= lang('DevDetail_Nmap_buttonSkipDiscovery');?> (' + document.getElementById('txtLastIP').value +')';
|
||||
}, 2000);
|
||||
</script>
|
||||
|
||||
<button type="button" id="piamanualnmap_fast" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'fast')">Loading...</button>
|
||||
<button type="button" id="piamanualnmap_normal" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'normal')">Loading...</button>
|
||||
<button type="button" id="piamanualnmap_detail" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'detail')">Loading...</button>
|
||||
<button type="button" id="piamanualnmap_skipdiscovery" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'skipdiscovery')">Loading...</button>
|
||||
|
||||
<div style="text-align: left;">
|
||||
<ul style="padding:20px;">
|
||||
<li><?= lang('DevDetail_Nmap_buttonFast_text');?></li>
|
||||
<li><?= lang('DevDetail_Nmap_buttonDefault_text');?></li>
|
||||
<li><?= lang('DevDetail_Nmap_buttonDetail_text');?></li>
|
||||
<li><?= lang('DevDetail_Nmap_buttonSkipDiscovery_text');?></li>
|
||||
<li><a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="/maintenance.php#tab_Logging"><?= lang('DevDetail_Nmap_resultsLink');?></a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="scanoutput" style="margin-top: 30px;"></div>
|
||||
|
||||
<script>
|
||||
function manualnmapscan(targetip, mode) {
|
||||
$( "#scanoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/nmap_scan.php",
|
||||
data: { scan: targetip, mode: mode },
|
||||
beforeSend: function() { $('#scanoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#scanoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
console.log(data);
|
||||
$("#scanoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<h3><?= lang("DevDetail_Tab_NmapTableHeader");?></h3>
|
||||
|
||||
<div><?= lang("DevDetail_Tab_NmapTableText");?></div>
|
||||
|
||||
<table id="tableNmap" class="table table-bordered table-hover table-striped ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Index</th>
|
||||
<th>Time</th>
|
||||
<th>Port</th>
|
||||
<th>State</th>
|
||||
<th>Service</th>
|
||||
<th>Extra (Notes)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- Comment out tbody when trying to implement better table with datatables here -->
|
||||
<!-- IDEA: Show unmatched pholus entries? -->
|
||||
<tbody id="tableNmapBody">
|
||||
<tr id="tableNmapPlc" class="text-center"><td colspan='7'><span><?= lang("DevDetail_Tab_NmapEmpty"); ?></span></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
require 'deviceDetailsTools.php';
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
|
||||
|
||||
<!-- tab page 3 ------------------------------------------------------------ -->
|
||||
<div class="tab-pane fade table-responsive" id="panPresence">
|
||||
|
||||
<!-- spinner -->
|
||||
<div id="loading" style="display: none">
|
||||
<div class="pa_semitransparent-panel"></div>
|
||||
<div class="panel panel-default pa_spinner">
|
||||
<table><td width="130px" align="middle">Loading...</td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade table-responsive" id="panPresence">
|
||||
|
||||
<!-- Calendar -->
|
||||
<div id="calendar">
|
||||
@@ -671,36 +562,14 @@
|
||||
<table id="tableEvents" class="table table-bordered table-hover table-striped ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Event type</th>
|
||||
<th>IP</th>
|
||||
<th>Additional info</th>
|
||||
<th><?= lang("DevDetail_Tab_EventsTableDate");?></th>
|
||||
<th><?= lang("DevDetail_Tab_EventsTableEvent");?></th>
|
||||
<th><?= lang("DevDetail_Tab_EventsTableIP");?></th>
|
||||
<th><?= lang("DevDetail_Tab_EventsTableInfo");?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<!-- tab page 6 ------------------------------------------------------------ -->
|
||||
<div class="tab-pane fade table-responsive" id="panPholus">
|
||||
<!-- Datatable Events -->
|
||||
<table id="tablePholus" class="table table-bordered table-hover table-striped ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Index</th>
|
||||
<th>Info</th>
|
||||
<th>Time</th>
|
||||
<th>IP</th>
|
||||
<th>Entry Type</th>
|
||||
<th>Value</th>
|
||||
<th>Extra</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- Comment out tbody when trying to implement better table with datatables here -->
|
||||
<!-- IDEA: Show unmatched pholus entries? -->
|
||||
<tbody id="tablePholusBody">
|
||||
<tr id="tablePholusPlc" class="text-center"><td colspan='7'><span><?= lang("DevDetail_Tab_PholusEmpty"); ?></span></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- tab page 7 ------------------------------------------------------------ -->
|
||||
<div class="tab-pane fade table-responsive" id="panPlugins">
|
||||
@@ -772,20 +641,6 @@ if ($ENABLED_DARKMODE === True) {
|
||||
return params.mac
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
function getDevicesListValue(idColumn, idValue, returnColumn)
|
||||
{
|
||||
// Read cache
|
||||
devicesListAll = JSON.parse(getCache('devicesListAll'));
|
||||
|
||||
if(emptyArr.includes(devicesListAll) || emptyArr.includes(idValue))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return devicesListAll.find((item) => {return item[idColumn] == idValue})[returnColumn]
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
function getDevicesList()
|
||||
{
|
||||
@@ -803,30 +658,9 @@ if ($ENABLED_DARKMODE === True) {
|
||||
// ------------------------------------------------------------
|
||||
|
||||
mac = getMac() // can also be rowID!! not only mac
|
||||
var devicesList = []; // this will contain a list the database row IDs of the devices ordered by the position displayed in the UI
|
||||
var devicesListAll = []; // this will contain a list off all devices
|
||||
|
||||
|
||||
$.get('php/server/devices.php?action=getDevicesList&status=all&forceDefaultOrder', function(data) {
|
||||
|
||||
rawData = JSON.parse (data)
|
||||
|
||||
devicesListAll = rawData["data"].map(item => { return {
|
||||
"name":item[0],
|
||||
"type":item[2],
|
||||
"icon":item[3],
|
||||
"mac":item[11],
|
||||
"parentMac":item[14],
|
||||
"rowid":item[13],
|
||||
"status":item[10]
|
||||
}})
|
||||
|
||||
setCache('devicesListAll', JSON.stringify(devicesListAll))
|
||||
|
||||
// Read parameters & Initialize components
|
||||
main();
|
||||
});
|
||||
var devicesList = []; // this will contain a list the database row IDs of the devices ordered by the position displayed in the UI
|
||||
|
||||
main();
|
||||
|
||||
var pos = -1;
|
||||
var parPeriod = 'Front_Details_Period';
|
||||
@@ -845,7 +679,6 @@ if ($ENABLED_DARKMODE === True) {
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function main () {
|
||||
// Initialize MAC
|
||||
@@ -1124,7 +957,7 @@ function initializeDatatables () {
|
||||
// Processing
|
||||
'processing' : true,
|
||||
'language' : {
|
||||
processing: '<table><td width="130px" align="middle">Loading...</td>'+
|
||||
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
|
||||
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
|
||||
'</td></table>',
|
||||
emptyTable: 'No data',
|
||||
@@ -1163,7 +996,7 @@ function initializeDatatables () {
|
||||
// Processing
|
||||
'processing' : true,
|
||||
'language' : {
|
||||
processing: '<table><td width="130px" align="middle">Loading...</td>'+
|
||||
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
|
||||
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
|
||||
'</td></table>',
|
||||
emptyTable: 'No data',
|
||||
@@ -1232,6 +1065,16 @@ function initializeCalendar () {
|
||||
duration : { month: 1 },
|
||||
buttonText : '<?= lang('Presence_CalHead_month');?>',
|
||||
columnHeaderFormat : 'D'
|
||||
},
|
||||
agendaWeek: {
|
||||
buttonText : '<?= lang('Presence_CalHead_week');?>',
|
||||
},
|
||||
agendaDay: {
|
||||
type : 'agenda',
|
||||
duration : { day: 1 },
|
||||
buttonText : '<?= lang('Presence_CalHead_day');?>',
|
||||
slotLabelFormat : 'H',
|
||||
slotDuration : '01:00:00'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1278,16 +1121,16 @@ function initializeCalendar () {
|
||||
},
|
||||
|
||||
eventRender: function (event, element) {
|
||||
$(element).tooltip({container: 'body', placement: 'right',
|
||||
$(element).tooltip({container: 'body', placement: 'bottom',
|
||||
title: event.tooltip});
|
||||
// element.attr ('title', event.tooltip); // Alternative tooltip
|
||||
},
|
||||
|
||||
loading: function( isLoading, view ) {
|
||||
if (isLoading) {
|
||||
$('#loading').show();
|
||||
showSpinner()
|
||||
} else {
|
||||
$('#loading').hide();
|
||||
hideSpinner()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1448,9 +1291,12 @@ function getDeviceData (readAllData=false) {
|
||||
$('#txtGroup').val (deviceData['dev_Group']);
|
||||
$('#txtLocation').val (deviceData['dev_Location']);
|
||||
$('#txtComments').val (deviceData['dev_Comments']);
|
||||
$('#txtNetworkNodeMac').val (getDevicesListValue('mac', deviceData['dev_Network_Node_MAC_ADDR'] ,'name'));
|
||||
$('#txtNetworkNodeMac').val ( getDeviceDataByMacAddress(deviceData['dev_Network_Node_MAC_ADDR'], "dev_Name")) ;
|
||||
$('#txtNetworkNodeMac').attr ('data-mynodemac', deviceData['dev_Network_Node_MAC_ADDR']);
|
||||
$('#txtNetworkPort').val (deviceData['dev_Network_Node_port']);
|
||||
// disabling network node configuration if root Internet node
|
||||
$('#txtNetworkNodeMac').prop('readonly', mac == 'Internet' );
|
||||
$('#txtNetworkPort').prop('readonly', mac == 'Internet' );
|
||||
|
||||
$('#txtFirstConnection').val (deviceData['dev_FirstConnection']);
|
||||
$('#txtLastConnection').val (deviceData['dev_LastConnection']);
|
||||
@@ -1850,7 +1696,7 @@ function setTextValue (textElement, textValue) {
|
||||
if(textElement == "txtNetworkNodeMac")
|
||||
{
|
||||
$('#'+textElement).attr ('data-mynodemac', textValue);
|
||||
$('#'+textElement).val (getDevicesListValue('mac', textValue ,'name') );
|
||||
$('#'+textElement).val (getDeviceDataByMacAddress(textValue, "dev_Name"));
|
||||
} else
|
||||
{
|
||||
$('#'+textElement).attr ('data-myvalue', textValue);
|
||||
@@ -1879,102 +1725,14 @@ function initializeTabsNew () {
|
||||
// events on tab change
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr("href") // activated tab
|
||||
|
||||
// load tab data only when needed (tab change)
|
||||
if(target == "#panPholus")
|
||||
{
|
||||
loadPholus();
|
||||
}
|
||||
if(target == "#panNmap")
|
||||
{
|
||||
loadNmap();
|
||||
}
|
||||
|
||||
// if(target == "#panTools")
|
||||
// {
|
||||
// // loadTools();
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function loadNmap()
|
||||
{
|
||||
$(".deviceSpecific").remove(); // remove any previous data listed in the table
|
||||
|
||||
$.get('php/server/devices.php?action=getNmap&mac='+ mac, function(data) {
|
||||
|
||||
data = sanitize(data);
|
||||
|
||||
if(data != "false" && $.trim(data) != [])
|
||||
{
|
||||
var listData = JSON.parse(data);
|
||||
var order = 1;
|
||||
|
||||
tableRows = "";
|
||||
|
||||
// for each item
|
||||
listData.forEach(function (item, index) {
|
||||
tableRows += '<tr class="deviceSpecific">\
|
||||
<td>'+item.Index+'</td>\
|
||||
<td>'+item.Time+'</td>\
|
||||
<td>\
|
||||
<a href="http://'+item.IP+':'+item.Port.split('/')[0]+'" target="_blank">'+item.Port+'</a>\
|
||||
<a href="https://'+item.IP+':'+item.Port.split('/')[0]+'" target="_blank">\
|
||||
<span style="padding-left:5px"><i class="fa fa-lock "></i></a></span>\
|
||||
</td>\
|
||||
<td>'+item.State+'</td>\
|
||||
<td>'+item.Service+'</td>\
|
||||
<td>\
|
||||
<div class="input-group">\
|
||||
<input class="form-control" id="port_'+item.Index+'" type="text" value="'+item.Extra+'">\
|
||||
<span class="input-group-addon"><i class="fa fa-save pointer" onclick="saveNmapPort('+item.Index+')"></i></span>\
|
||||
</div>\
|
||||
</td>\
|
||||
</tr>';
|
||||
});
|
||||
|
||||
$("#tableNmapBody").html($("#tableNmapBody").html()+tableRows);
|
||||
$("#tableNmapPlc").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
// console.log("else")
|
||||
$("#tableNmapPlc").show();
|
||||
$(".deviceSpecific").remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function loadPholus()
|
||||
{
|
||||
$(".deviceSpecific").remove(); // remove any previous data listed in teh table
|
||||
|
||||
$.get('php/server/devices.php?action=getPholus&mac='+ mac, function(data) {
|
||||
|
||||
data = sanitize(data);
|
||||
|
||||
if(data != "false" && $.trim(data) != [])
|
||||
{
|
||||
var listData = JSON.parse(data);
|
||||
var order = 1;
|
||||
|
||||
tableRows = "";
|
||||
|
||||
// for each item
|
||||
listData.forEach(function (item, index) {
|
||||
tableRows += '<tr class="deviceSpecific"><td>'+item.Index+'</td><td>'+item.Info+'</td><td>'+item.Time+'</td><td>'+item.IP_v4_or_v6+'</td><td>'+item.Record_Type+'</td><td>'+item.Value+'</td><td>'+ item.Extra +'</td></tr>';
|
||||
});
|
||||
|
||||
$("#tablePholusBody").html($("#tablePholusBody").html()+tableRows);
|
||||
$("#tablePholusPlc").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
// console.log("else")
|
||||
$("#tablePholusPlc").show();
|
||||
$(".deviceSpecific").remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
@@ -2008,7 +1766,7 @@ function initTable(tableId, mac){
|
||||
// Processing
|
||||
'processing' : true,
|
||||
'language' : {
|
||||
processing: '<table><td width="130px" align="middle">Loading...</td>'+
|
||||
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
|
||||
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
|
||||
'</td></table>',
|
||||
emptyTable: 'No data',
|
||||
@@ -2045,24 +1803,8 @@ window.onload = function async()
|
||||
|
||||
function reloadTab()
|
||||
{
|
||||
// tab loaded without switching
|
||||
if(getCache("activeDevicesTab") == "tabPholus")
|
||||
{
|
||||
loadPholus();
|
||||
}
|
||||
|
||||
if(getCache("activeDevicesTab") == "tabNmap")
|
||||
{
|
||||
loadNmap();
|
||||
}
|
||||
// tab loaded without switching
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
function saveNmapPort(index)
|
||||
{
|
||||
saveData('saveNmapPort', index, $('#port_'+index).val())
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
214
front/deviceDetailsTools.php
Executable file
214
front/deviceDetailsTools.php
Executable file
@@ -0,0 +1,214 @@
|
||||
<script>
|
||||
deviceIP = getDeviceDataByMacAddress("<?php echo $_REQUEST["mac"]?>", "dev_LastIP")
|
||||
</script>
|
||||
|
||||
<?php if ($_REQUEST["mac"] == "Internet") { ?>
|
||||
|
||||
<h4 class=""><i class="fa-solid fa-globe"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Internet_Info_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Internet_Info_Description") ?>
|
||||
</h5>
|
||||
<br>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()">
|
||||
<?= lang("DevDetail_Tab_Tools_Internet_Info_Start") ?></button>
|
||||
<br>
|
||||
<div id="internetinfooutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_REQUEST["mac"] == "Internet") { ?>
|
||||
<h4 class=""><i class="fa-solid fa-gauge-high"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Speedtest_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Speedtest_Description") ?>
|
||||
</h5>
|
||||
<br>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">
|
||||
<?= lang("DevDetail_Tab_Tools_Speedtest_Start") ?></button>
|
||||
<br>
|
||||
<div id="speedtestoutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_REQUEST["mac"] != "Internet") { ?>
|
||||
<h4 class=""><i class="fa-solid fa-route"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Traceroute_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Traceroute_Description") ?>
|
||||
</h5>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="traceroute" class="btn btn-primary pa-btn" style="margin: auto;" onclick="traceroute()">
|
||||
<?= lang("DevDetail_Tab_Tools_Traceroute_Start") ?>
|
||||
</button>
|
||||
<br>
|
||||
<div id="tracerouteoutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_REQUEST["mac"] != "Internet") { ?>
|
||||
<h4 class=""><i class="fa-solid fa-magnifying-glass"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Nslookup_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Nslookup_Description") ?>
|
||||
</h5>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="nslookup" class="btn btn-primary pa-btn" style="margin: auto;" onclick="nslookup()">
|
||||
<?= lang("DevDetail_Tab_Tools_Nslookup_Start") ?>
|
||||
</button>
|
||||
<br>
|
||||
<div id="nslookupoutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<h4 class=""><i class="fa-solid fa-ethernet"></i>
|
||||
<?= lang("DevDetail_Nmap_Scans") ?>
|
||||
</h4>
|
||||
<div style="width:100%; text-align: center;">
|
||||
<div>
|
||||
<?= lang("DevDetail_Nmap_Scans_desc") ?>
|
||||
</div>
|
||||
|
||||
<button type="button" id="piamanualnmap_fast" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'fast')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
<button type="button" id="piamanualnmap_normal" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'normal')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
<button type="button" id="piamanualnmap_detail" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'detail')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
<button type="button" id="piamanualnmap_skipdiscovery" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'skipdiscovery')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
|
||||
<div style="text-align: left;">
|
||||
<ul style="padding:20px;">
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonFast_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonDefault_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonDetail_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonSkipDiscovery_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="/maintenance.php#tab_Logging">
|
||||
<?= lang("DevDetail_Nmap_resultsLink") ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="scanoutput" style="margin-top: 30px;"></div>
|
||||
|
||||
<script>
|
||||
// ----------------------------------------------------------------
|
||||
function manualnmapscan(targetip, mode) {
|
||||
$( "#scanoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/nmap_scan.php",
|
||||
data: { scan: targetip, mode: mode },
|
||||
beforeSend: function() { $('#scanoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#scanoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
console.log(data);
|
||||
$("#scanoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function speedtestcli() {
|
||||
$( "#speedtestoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/speedtestcli.php",
|
||||
beforeSend: function() { $('#speedtestoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#speedtestoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#speedtestoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function traceroute() {
|
||||
|
||||
$( "#tracerouteoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "./php/server/traceroute.php?action=get&ip=" + deviceIP + "",
|
||||
beforeSend: function() { $('#tracerouteoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#tracerouteoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#tracerouteoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function nslookup() {
|
||||
|
||||
$( "#nslookupoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "./php/server/nslookup.php?action=get&ip=" + deviceIP + "",
|
||||
beforeSend: function() { $('#nslookupoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#nslookupoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#nslookupoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
setTimeout(function(){
|
||||
document.getElementById('piamanualnmap_fast').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonFast"
|
||||
) ?> (' + deviceIP +')';
|
||||
document.getElementById('piamanualnmap_normal').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonDefault"
|
||||
) ?> (' + deviceIP +')';
|
||||
document.getElementById('piamanualnmap_detail').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonDetail"
|
||||
) ?> (' + deviceIP +')';
|
||||
document.getElementById('piamanualnmap_skipdiscovery').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonSkipDiscovery"
|
||||
) ?> (' + deviceIP +')';
|
||||
}, 2000);
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function internetinfo() {
|
||||
$( "#internetinfooutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/internetinfo.php",
|
||||
beforeSend: function() { $('#internetinfooutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#internetinfooutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#internetinfooutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -1,11 +1,16 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# devices.php - Front module. Devices list page
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# devices.php - Front module. Devices list page #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<?php
|
||||
|
||||
@@ -26,7 +31,8 @@
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<h1 id="pageTitle">
|
||||
<?= lang('Device_Title');?>
|
||||
<i class="fa fa-laptop"></i>
|
||||
<?= lang('Device_Title');?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
@@ -203,6 +209,8 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
function main () {
|
||||
|
||||
handleLoadingDialog()
|
||||
|
||||
// get from cookie if available (need to use decodeURI as saved as part of URI in PHP)
|
||||
cookieColumnsVisibleStr = decodeURI(getCookie("Front_Devices_Columns_Visible")).replaceAll('%2C',',')
|
||||
|
||||
@@ -420,7 +428,7 @@ function initializeDatatable () {
|
||||
default: color='aqua'; break;
|
||||
};
|
||||
|
||||
$(td).html ('<a href="deviceDetails.php?mac='+ rowData[10] +'" class="badge bg-'+ color +'">'+ cellData.replace('-', '') +'</a>');
|
||||
$(td).html ('<a href="deviceDetails.php?mac='+ rowData[mapIndx(11)] +'" class="badge bg-'+ color +'">'+ cellData.replace('-', '') +'</a>');
|
||||
} },
|
||||
],
|
||||
|
||||
@@ -536,6 +544,26 @@ function getDevicesList (status) {
|
||||
'php/server/devices.php?action=getDevicesList&status=' + deviceStatus).load();
|
||||
};
|
||||
|
||||
function handleLoadingDialog()
|
||||
{
|
||||
$.get('api/app_state.json?nocache=' + Date.now(), function(appState) {
|
||||
|
||||
console.log(appState["showSpinner"])
|
||||
if(appState["showSpinner"])
|
||||
{
|
||||
showSpinner("settings_old")
|
||||
|
||||
setTimeout("handleLoadingDialog()", 1000);
|
||||
|
||||
} else
|
||||
{
|
||||
hideSpinner()
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="js/pialert_common.js"></script>
|
||||
|
||||
70
front/donations.php
Executable file
70
front/donations.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
require 'php/templates/header.php';
|
||||
?>
|
||||
<script src="js/pialert_common.js"></script>
|
||||
<div id="donationsPage" class="content-wrapper">
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<h1 id="pageTitle">
|
||||
<i class="fa fa-heart"></i>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content ---------------------------------------------------------- -->
|
||||
<section class="content donations">
|
||||
<div id="donationsText" class="box box-solid"></div>
|
||||
<div class="content-header">
|
||||
<h3 class="box-title " id="donationsPlatforms"></h3>
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-body">
|
||||
<div class="col-sm-2">
|
||||
<a target="_blank" href="https://github.com/sponsors/jokob-sk">
|
||||
<img alt="Sponsor Me on GitHub" src="https://i.imgur.com/X6p5ACK.png" width="150px">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a target="_blank" href="https://www.buymeacoffee.com/jokobsk">
|
||||
<img alt="Buy Me A Coffee" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" width="117px" height="30px">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a target="_blank" href="https://www.patreon.com/user?u=84385063">
|
||||
<img alt="Support me on patreon" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" width="117px">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-header">
|
||||
<h3 class="box-title " id="donationsOthers"></h3>
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-body">
|
||||
<div class="col-sm-12">
|
||||
<ul>
|
||||
<li>Bitcoin: <code>1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM</code></li>
|
||||
<li>Ethereum: <code>0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</section>
|
||||
|
||||
</div> <!-- End of class="content-wrapper" -->
|
||||
|
||||
<script>
|
||||
function init()
|
||||
{
|
||||
$("#donationsText").html(getString("Donations_Text"))
|
||||
$("#pageTitle").append(getString("Donations_Title"))
|
||||
$("#donationsPlatforms").append(getString("Donations_Platforms"))
|
||||
$("#donationsOthers").append(getString("Donations_Others"))
|
||||
}
|
||||
|
||||
init();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
require 'php/templates/footer.php';
|
||||
?>
|
||||
@@ -1,14 +1,19 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# events.php - Front module. Events page
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# events.php - Front module. Events page #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<?php
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/header.php';
|
||||
?>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
@@ -17,7 +22,8 @@
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<h1 id="pageTitle">
|
||||
<?= lang('Events_Title');?>
|
||||
<i class="fa fa-bolt"></i>
|
||||
<?= lang('Events_Title');?>
|
||||
</h1>
|
||||
|
||||
<!-- period selector -->
|
||||
@@ -251,7 +257,7 @@ function initializeDatatable () {
|
||||
// Processing
|
||||
'processing' : true,
|
||||
'language' : {
|
||||
processing: '<table><td width="130px" align="middle">Loading...</td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td></table>',
|
||||
processing: '<table><td width="130px" align="middle"><?= lang("Events_Loading");?></td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td></table>',
|
||||
emptyTable: 'No data',
|
||||
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
|
||||
"search": "<?= lang('Events_Searchbox');?>: ",
|
||||
|
||||
31
front/flows.php
Executable file
31
front/flows.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/notification.php';
|
||||
?>
|
||||
|
||||
<script src="js/pialert_common.js"></script>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1 id="pageTitle">
|
||||
<i class="fa fa-fw fa-plug"></i> <?= lang('Navigation_Flows');?>
|
||||
<span class="pageHelp"> <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins"><i class="fa fa-circle-question"></i></a><span>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
|
||||
<?php
|
||||
// require 'pluginsCore.php';
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require 'php/templates/footer.php';
|
||||
?>
|
||||
@@ -8,13 +8,17 @@
|
||||
<section class="content-header">
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
<h1 id="pageTitle">
|
||||
<?= lang('HelpFAQ_Title');?>
|
||||
<i class="fa fa-question"></i>
|
||||
<?= lang('HelpFAQ_Title');?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content ---------------------------------------------------------- -->
|
||||
<section class="content">
|
||||
<h4><?= lang('HelpFAQ_Cat_General');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-question"></i>
|
||||
<?= lang('HelpFAQ_Cat_General');?>
|
||||
</h4>
|
||||
|
||||
<div class="panel-group" id="accordion_gen">
|
||||
<div class="panel panel-default">
|
||||
@@ -105,7 +109,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?= lang('Navigation_Devices');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-laptop"></i>
|
||||
<?= lang('Navigation_Devices');?>
|
||||
</h4>
|
||||
<div class="panel-group" id="accordion_dev">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@@ -123,7 +130,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
<h4><?= lang('HelpFAQ_Cat_Detail');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-info-circle"></i><?= lang('HelpFAQ_Cat_Detail');?></h4>
|
||||
<div class="panel-group" id="accordion_det">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@@ -181,7 +189,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?= lang('Navigation_Presence');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-calendar"></i>
|
||||
<?= lang('Navigation_Presence');?>
|
||||
</h4>
|
||||
<div class="panel-group" id="accordion_pre">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@@ -211,7 +222,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?= lang('Navigation_Network');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-network-wired"></i><?= lang('Navigation_Network');?></h4>
|
||||
<div class="panel-group" id="accordion_net">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@@ -229,6 +241,7 @@
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<br>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
@@ -1,73 +1,51 @@
|
||||
function handleVersion(){
|
||||
//--------------------------------------------------------------
|
||||
// Handle the UI changes to show or hide notifications about a new version
|
||||
function versionUpdateUI(){
|
||||
|
||||
release_timestamp = getCookie("release_timestamp")
|
||||
isNewVersion = getCookie("isNewVersion")
|
||||
|
||||
if(release_timestamp != "")
|
||||
{
|
||||
console.log(isNewVersion)
|
||||
|
||||
build_timestamp = parseInt($('#version').attr("data-build-time").match( /\d+/g ).join(''))
|
||||
|
||||
// if the release_timestamp is older by 10 min or more as the build timestamp then there is a new release available
|
||||
if(release_timestamp > build_timestamp + 600 )
|
||||
{
|
||||
console.log("New release!")
|
||||
// handling the navigation menu icon
|
||||
$('#version').attr("class", $('#version').attr("class").replace("myhidden", ""))
|
||||
|
||||
maintenanceDiv = $('#new-version-text')
|
||||
}
|
||||
else{
|
||||
console.log("All up-to-date!")
|
||||
|
||||
maintenanceDiv = $('#current-version-text')
|
||||
}
|
||||
|
||||
// handling the maintenance section message
|
||||
if(emptyArr.includes(maintenanceDiv) == false && $(maintenanceDiv).length != 0)
|
||||
{
|
||||
$(maintenanceDiv).attr("class", $(maintenanceDiv).attr("class").replace("myhidden", ""))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
function getVersion()
|
||||
// if the release_timestamp is older by 10 min or more as the build timestamp then there is a new release available
|
||||
if(isNewVersion != "false")
|
||||
{
|
||||
release_timestamp = getCookie("release_timestamp")
|
||||
console.log("New release!")
|
||||
// handling the navigation menu icon
|
||||
$('#version').attr("class", $('#version').attr("class").replace("myhidden", ""))
|
||||
|
||||
// no cached value available
|
||||
if(release_timestamp == "")
|
||||
{
|
||||
$.get('https://api.github.com/repos/jokob-sk/Pi.Alert/releases').done(function(response) {
|
||||
// Handle successful response
|
||||
var releases = response;
|
||||
|
||||
if(releases.length > 0)
|
||||
{
|
||||
|
||||
release_datetime = releases[0].published_at;
|
||||
release_timestamp = new Date(release_datetime).getTime() / 1000;
|
||||
maintenanceDiv = $('#new-version-text')
|
||||
}
|
||||
else{
|
||||
console.log("All up-to-date!")
|
||||
|
||||
// cache value
|
||||
setCookie("release_timestamp", release_timestamp, 30);
|
||||
|
||||
handleVersion();
|
||||
}
|
||||
|
||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||
|
||||
$('.version').append(`<p>Github API: ${errorThrown} (${jqXHR.status}), ${jqXHR.responseJSON.message}</p>`)
|
||||
|
||||
});
|
||||
} else
|
||||
{
|
||||
// cache is available, just call the handler
|
||||
handleVersion()
|
||||
}
|
||||
maintenanceDiv = $('#current-version-text')
|
||||
}
|
||||
|
||||
// handling the maintenance section message
|
||||
if(emptyArr.includes(maintenanceDiv) == false && $(maintenanceDiv).length != 0)
|
||||
{
|
||||
$(maintenanceDiv).attr("class", $(maintenanceDiv).attr("class").replace("myhidden", ""))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Checks if a new version is available via the global app_state.json
|
||||
function checkIfNewVersionAvailable()
|
||||
{
|
||||
$.get('api/app_state.json?nocache=' + Date.now(), function(appState) {
|
||||
|
||||
console.log(appState["isNewVersionChecked"])
|
||||
console.log(appState["isNewVersion"])
|
||||
|
||||
// cache value
|
||||
setCookie("isNewVersion", appState["isNewVersion"], 30);
|
||||
setCookie("isNewVersionChecked", appState["isNewVersionChecked"], 30);
|
||||
|
||||
versionUpdateUI();
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// handle the dispaly of the NEW icon
|
||||
getVersion()
|
||||
checkIfNewVersionAvailable()
|
||||
@@ -11,6 +11,9 @@
|
||||
var timerRefreshData = ''
|
||||
var modalCallbackFunction = '';
|
||||
var emptyArr = ['undefined', "", undefined, null, 'null'];
|
||||
var UI_LANG = "English";
|
||||
var settingsJSON = {}
|
||||
|
||||
|
||||
// urlParams = new Proxy(new URLSearchParams(window.location.search), {
|
||||
// get: (searchParams, prop) => searchParams.get(prop.toString()),
|
||||
@@ -20,13 +23,13 @@ var emptyArr = ['undefined', "", undefined, null, 'null'];
|
||||
// -----------------------------------------------------------------------------
|
||||
// Simple session cache withe expiration managed via cookies
|
||||
// -----------------------------------------------------------------------------
|
||||
function getCache(key)
|
||||
function getCache(key, noCookie = false)
|
||||
{
|
||||
// check cache
|
||||
if(sessionStorage.getItem(key))
|
||||
{
|
||||
// check if not expired
|
||||
if(getCookie(key + '_session_expiry') != "")
|
||||
if(noCookie || getCookie(key + '_session_expiry') != "")
|
||||
{
|
||||
return sessionStorage.getItem(key);
|
||||
}
|
||||
@@ -38,8 +41,13 @@ function getCache(key)
|
||||
// -----------------------------------------------------------------------------
|
||||
function setCache(key, data, expirationMinutes='')
|
||||
{
|
||||
sessionStorage.setItem(key, data);
|
||||
setCookie (key + '_session_expiry', 'OK', expirationMinutes='')
|
||||
sessionStorage.setItem(key, data);
|
||||
|
||||
// create cookie if expiration set to handle refresh of data
|
||||
if (expirationMinutes != '')
|
||||
{
|
||||
setCookie (key + '_session_expiry', 'OK', expirationMinutes='')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +104,105 @@ function deleteAllCookies() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Get settings from the .json file generated by the python backend
|
||||
// -----------------------------------------------------------------------------
|
||||
function cacheSettings()
|
||||
{
|
||||
|
||||
$.get('api/table_settings.json', function(res) {
|
||||
|
||||
settingsJSON = res;
|
||||
|
||||
data = settingsJSON["data"];
|
||||
|
||||
data.forEach((set) => {
|
||||
setCache(`pia_set_${set.Code_Name}`, set.Value)
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function getSetting (key) {
|
||||
|
||||
result = getCache(`pia_set_${key}`, true);
|
||||
|
||||
if (result == "")
|
||||
{
|
||||
console.log(`Setting with key "${key}" not found`)
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Get language string
|
||||
// -----------------------------------------------------------------------------
|
||||
function cacheStrings()
|
||||
{
|
||||
|
||||
// handle core strings and translations
|
||||
var allLanguages = ["en_us","es_es","de_de"]; // needs to be same as in lang.php
|
||||
|
||||
allLanguages.forEach(function (language_code) {
|
||||
|
||||
$.get(`php/templates/language/${language_code}.json`, function(res) {
|
||||
|
||||
Object.entries(res).forEach(([language, translations]) => {
|
||||
|
||||
Object.entries(translations).forEach(([key, value]) => {
|
||||
// store as key - value pairs in session
|
||||
setCache(`pia_lang_${key}_${language}`, value)
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// handle strings and translations from plugins
|
||||
$.get('api/table_plugins_language_strings.json', function(res) {
|
||||
|
||||
data = res["data"];
|
||||
|
||||
data.forEach((langString) => {
|
||||
setCache(`pia_lang_${langString.String_Key}_${langString.Language_Code}`, langString.String_Value)
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// Get translated language string
|
||||
function getString (key) {
|
||||
|
||||
UI_LANG = getSetting("UI_LANG");
|
||||
|
||||
lang_code = 'en_us';
|
||||
|
||||
switch(UI_LANG)
|
||||
{
|
||||
case 'English':
|
||||
lang_code = 'en_us';
|
||||
break;
|
||||
case 'Spanish':
|
||||
lang_code = 'es_es';
|
||||
break;
|
||||
case 'German':
|
||||
lang_code = 'de_de';
|
||||
break;
|
||||
}
|
||||
result = getCache(`pia_lang_${key}_${lang_code}`, true);
|
||||
|
||||
|
||||
if(isEmpty(result))
|
||||
{
|
||||
result = getCache(`pia_lang_${key}_en_us`, true);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Modal dialog handling
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -200,6 +307,13 @@ function showMessage (textMessage="") {
|
||||
// -----------------------------------------------------------------------------
|
||||
// General utilities
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// check if JSON object
|
||||
function isJsonObject(value) {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
|
||||
// remove unnecessary lines from the result
|
||||
function sanitize(data)
|
||||
{
|
||||
@@ -363,12 +477,104 @@ function navigateToDeviceWithIp (ip) {
|
||||
window.open(window.location.origin +'/deviceDetails.php?mac=' + mac , "_blank");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function getNameByMacAddress(macAddress) {
|
||||
return getDeviceDataByMacAddress(macAddress, "dev_Name")
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
function getDeviceDataByMacAddress(macAddress, dbColumn) {
|
||||
|
||||
const sessionDataKey = 'devicesListAll_JSON';
|
||||
const sessionData = sessionStorage.getItem(sessionDataKey);
|
||||
|
||||
if (!sessionData) {
|
||||
console.log(`Session variable "${sessionDataKey}" not found.`);
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
const devices = JSON.parse(sessionData);
|
||||
|
||||
for (const device of devices) {
|
||||
if (device["dev_MAC"].toLowerCase() === macAddress.toLowerCase()) {
|
||||
|
||||
return device[dbColumn];
|
||||
}
|
||||
}
|
||||
|
||||
return "Unknown"; // Return a default value if MAC address is not found
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function initDeviceListAll_JSON()
|
||||
{
|
||||
|
||||
$.get('api/table_devices.json', function(data) {
|
||||
|
||||
console.log(data)
|
||||
|
||||
devicesListAll_JSON = data["data"]
|
||||
|
||||
setCache('devicesListAll_JSON', JSON.stringify(devicesListAll_JSON))
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var devicesListAll_JSON = []; // this will contain a list off all devices
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function isEmpty(value)
|
||||
{
|
||||
return emptyArr.includes(value)
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Loading Spinner overlay
|
||||
// -----------------------------------------------------------------------------
|
||||
function showSpinner(stringKey='Loading')
|
||||
{
|
||||
if($("#loadingSpinner").length)
|
||||
{
|
||||
|
||||
$("#loadingSpinner").show();
|
||||
}
|
||||
else{
|
||||
html = `
|
||||
<!-- spinner -->
|
||||
<div id="loadingSpinner" style="display: block">
|
||||
<div class="pa_semitransparent-panel"></div>
|
||||
<div class="panel panel-default pa_spinner">
|
||||
<table>
|
||||
<td width="130px" align="middle">${getString(stringKey)}</td>
|
||||
<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
$(".wrapper").append(html)
|
||||
}
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
function hideSpinner()
|
||||
{
|
||||
$("#loadingSpinner").hide()
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// initialize
|
||||
// -----------------------------------------------------------------------------
|
||||
cacheSettings()
|
||||
cacheStrings()
|
||||
initDeviceListAll_JSON()
|
||||
|
||||
|
||||
console.log("init pialert_common.js")
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Pi.Alert
|
||||
// Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
//
|
||||
// devices.php - Front module. Server side. Manage Devices
|
||||
//------------------------------------------------------------------------------
|
||||
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
// jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3
|
||||
// leiweibau 2022 https://github.com/leiweibau GNU GPLv3
|
||||
//------------------------------------------------------------------------------
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# maintenance.php - Front module. Server side. Maintenance #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
|
||||
// Skin selector config ----------------------------------------------------
|
||||
//
|
||||
@@ -44,7 +44,8 @@ $pia_installed_skins = array('skin-black-light',
|
||||
<section class="content-header">
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
<h1 id="pageTitle">
|
||||
<?= lang('Maintenance_Title');?>
|
||||
<i class="fa fa-wrench"></i>
|
||||
<?= lang('Maintenance_Title');?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
@@ -151,7 +152,10 @@ $db->close();
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="Maintain-Status">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Status</h3>
|
||||
<h3 class="box-title">
|
||||
<i class="fa fa-display"></i></i>
|
||||
<?= lang('Maintenance_Status');?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body" style="padding-bottom: 5px;">
|
||||
<div class="db_info_table">
|
||||
@@ -164,6 +168,18 @@ $db->close();
|
||||
<div class="version" id="version" data-build-time="<?php echo file_get_contents( "buildtimestamp.txt");?>"><?php echo '<span id="new-version-text" class="myhidden">' .lang('Maintenance_new_version').'</span>'.'<span id="current-version-text" class="myhidden">' .lang('Maintenance_current_version').'</span>';?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_built_on');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo date("Y-m-d", ((int)file_get_contents( "buildtimestamp.txt")));?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_Running_Version');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php include 'php/templates/version.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_database_path');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
@@ -203,17 +219,29 @@ $db->close();
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a id="tab_Settings_id" href="#tab_Settings" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_UISettings');?></a>
|
||||
<li class="active">
|
||||
<a id="tab_Settings_id" href="#tab_Settings" data-toggle="tab">
|
||||
<i class="fa fa-cogs"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_UISettings');?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="tab_DBTools_id" href="#tab_DBTools" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_Tools');?></a>
|
||||
<a id="tab_DBTools_id" href="#tab_DBTools" data-toggle="tab">
|
||||
<i class="fa fa-toolbox"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_Tools');?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="tab_BackupRestore_id" href="#tab_BackupRestore" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_BackupRestore');?></a>
|
||||
<a id="tab_BackupRestore_id" href="#tab_BackupRestore" data-toggle="tab">
|
||||
<i class="fa fa-file-shield"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_BackupRestore');?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="tab_Logging_id" href="#tab_Logging" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_Logging');?></a>
|
||||
<a id="tab_Logging_id" href="#tab_Logging" data-toggle="tab">
|
||||
<i class="fa fa-triangle-exclamation"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_Logging');?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@@ -673,7 +701,7 @@ function askExportCSV() {
|
||||
function ExportCSV()
|
||||
{
|
||||
// Execute
|
||||
openInNewTab(window.location.origin + "/php/server/devices.php?action=ExportCSV")
|
||||
openInNewTab("php/server/devices.php?action=ExportCSV")
|
||||
}
|
||||
|
||||
// Import CSV
|
||||
@@ -685,7 +713,7 @@ function askImportCSV() {
|
||||
function ImportCSV()
|
||||
{
|
||||
// Execute
|
||||
$.get('/php/server/devices.php?action=ImportCSV', function(msg) {
|
||||
$.get('php/server/devices.php?action=ImportCSV', function(msg) {
|
||||
showMessage (msg);
|
||||
});
|
||||
}
|
||||
@@ -930,4 +958,4 @@ window.onload = function asyncFooter()
|
||||
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<script src="js/pialert_common.js"></script>
|
||||
<script src="js/pialert_common.js"></script>
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
define('badge_online', '<div class="badge bg-green text-white" style="width: 60px;">Online</div>');
|
||||
define('badge_offline', '<div class="badge bg-red text-white" style="width: 60px;">Offline</div>');
|
||||
define('circle_online', '<div class="badge bg-green text-white" style="width: 10px; height: 10px; padding:2px; margin-top: -25px;"> </div>');
|
||||
define('circle_offline', '<div class="badge bg-red text-white" style="width: 10px; height: 10px; padding:2px; margin-top: -25px;"> </div>');
|
||||
define('circle_offline', '<div class="badge bg-red text-white" style="width: 10px; height: 10px; padding:2px; margin-top: -25px;"> </div>');
|
||||
|
||||
$NETWORKTYPES = getNetworkTypes();
|
||||
?>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
@@ -24,8 +23,7 @@
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div id="networkTree" ></div>
|
||||
<div id="networkTree" class="drag"></div>
|
||||
|
||||
<!-- Main content ---------------------------------------------------------- -->
|
||||
<section class="content">
|
||||
@@ -268,6 +266,8 @@
|
||||
// Smart TV (leaf) Switch 2 (node (for the PC) and leaf (for Switch 1))
|
||||
// \
|
||||
// PC (leaf) <------- leafs are not included in this SQL query
|
||||
|
||||
$networkDeviceTypes = str_replace("]", "",(str_replace("[", "", getSettingValue("NETWORK_DEVICE_TYPES"))));
|
||||
|
||||
$sql = "SELECT node_name, node_mac, online, node_type, node_ports_count, parent_mac, node_icon
|
||||
FROM
|
||||
@@ -279,7 +279,7 @@
|
||||
a.dev_Network_Node_MAC_ADDR as parent_mac,
|
||||
a.dev_Icon as node_icon
|
||||
FROM Devices a
|
||||
WHERE a.dev_DeviceType in ('AP', 'Gateway', 'Firewall', 'Hypervisor', 'Powerline', 'Switch', 'WLAN', 'PLC', 'Router','USB LAN Adapter', 'USB WIFI Adapter', 'Internet')
|
||||
WHERE a.dev_DeviceType in (".$networkDeviceTypes.")
|
||||
) t1
|
||||
LEFT JOIN
|
||||
(
|
||||
@@ -448,6 +448,7 @@
|
||||
require 'php/templates/footer.php';
|
||||
?>
|
||||
|
||||
|
||||
<script src="lib/treeviz/index.js"></script>
|
||||
<script src="lib/treeviz/require.js"></script>
|
||||
<script src="js/pialert_common.js"></script>
|
||||
@@ -471,6 +472,10 @@
|
||||
|
||||
setCache('devicesListNew', JSON.stringify(devicesListnew))
|
||||
|
||||
// init global variable
|
||||
deviceListGlobal = devicesListnew;
|
||||
|
||||
|
||||
// create tree
|
||||
initTree(getHierarchy());
|
||||
|
||||
@@ -484,20 +489,6 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Tree functionality
|
||||
// ---------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
function getDevicesList()
|
||||
{
|
||||
// Read cache
|
||||
devicesList = getCache('devicesListNew');
|
||||
|
||||
if (devicesList != '') {
|
||||
devicesList = JSON.parse (devicesList);
|
||||
} else {
|
||||
devicesList = [];
|
||||
}
|
||||
return devicesList;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
var leafNodesCount = 0;
|
||||
@@ -505,6 +496,7 @@
|
||||
var parentNodesCount = 0;
|
||||
var hiddenMacs = []; // hidden children
|
||||
var hiddenChildren = [];
|
||||
var deviceListGlobal = null;
|
||||
|
||||
|
||||
|
||||
@@ -559,14 +551,12 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function getHierarchy()
|
||||
{
|
||||
list = getDevicesList();
|
||||
|
||||
for(i in list)
|
||||
{
|
||||
for(i in deviceListGlobal)
|
||||
{
|
||||
if(list[i].mac == 'Internet')
|
||||
if(deviceListGlobal[i].mac == 'Internet')
|
||||
{
|
||||
return (getChildren(list[i], list, ''))
|
||||
return (getChildren(deviceListGlobal[i], deviceListGlobal, ''))
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -587,8 +577,6 @@
|
||||
removeItemFromArray(hiddenMacs, parentMac)
|
||||
}
|
||||
|
||||
list = getDevicesList();
|
||||
|
||||
// updatedTree = myHierarchy;
|
||||
updatedTree = getHierarchy()
|
||||
|
||||
@@ -607,9 +595,22 @@
|
||||
});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
function handleNodeClick(event)
|
||||
{
|
||||
|
||||
console.log(event.target.offsetParent)
|
||||
|
||||
const targetTabMAC = $(event.target.offsetParent).attr("data-mytreemacmain");
|
||||
|
||||
var targetTab = $(`a[data-mytabmac="${targetTabMAC}"]`);
|
||||
|
||||
// Simulate a click event on the target tab
|
||||
targetTab.click();
|
||||
}
|
||||
// ---------------------------------------------------------------------------
|
||||
var myTree;
|
||||
var treeAreaHeight = 600;
|
||||
var treeAreaHeight = 800;
|
||||
var emSize;
|
||||
var nodeHeight;
|
||||
|
||||
@@ -617,22 +618,29 @@
|
||||
{
|
||||
// calculate the font size of the leaf nodes to fit everything into the tree area
|
||||
leafNodesCount == 0 ? 1 : leafNodesCount;
|
||||
emSize = ((600/(20*leafNodesCount)).toFixed(2));
|
||||
emSize = ((treeAreaHeight/(25*leafNodesCount)).toFixed(2));
|
||||
emSize = emSize > 1 ? 1 : emSize;
|
||||
|
||||
// nodeHeight = ((emSize*100*0.30).toFixed(0))
|
||||
nodeHeight = ((emSize*100*0.30).toFixed(0))
|
||||
|
||||
$("#networkTree").attr('style', `height:${treeAreaHeight}px; width:${$('.content-header').width()}px`)
|
||||
|
||||
console.log('here')
|
||||
|
||||
myTree = Treeviz.create({
|
||||
htmlId: "networkTree",
|
||||
|
||||
renderNode: nodeData => {
|
||||
var fontSize = "font-size:"+emSize+"em;";
|
||||
|
||||
(!emptyArr.includes(nodeData.data.port )) ? port = nodeData.data.port : port = "";
|
||||
|
||||
(port == "" || port == 0 ) ? portBckgIcon = `<i class="fa fa-wifi"></i>` : portBckgIcon = `<i class="fa fa-ethernet"></i>`;
|
||||
|
||||
// Build HTML for individual nodes in the network diagram
|
||||
deviceIcon = (!emptyArr.includes(nodeData.data.icon )) ? "<div class='netIcon ' ><i class='fa fa-"+nodeData.data.icon +"'></i></div>" : "";
|
||||
devicePort = (!emptyArr.includes(nodeData.data.port )) ? "<div class='netPort ' >"+nodeData.data.port +"</div>" : "";
|
||||
devicePort = `<div class='netPort ' style="width:${emSize*2.7}em;height:${emSize*2.7}em" >${port}</div> <div class="portBckgIcon" style="margin-left:-${emSize*2.5}em;">${portBckgIcon}</div>`;
|
||||
collapseExpandIcon = nodeData.data.hiddenChildren ? "square-plus" :"square-minus";
|
||||
collapseExpandHtml = (nodeData.data.hasChildren) ? "<div class='netCollapse' style='font-size:"+emSize*2.5+"em;' data-mytreepath='"+nodeData.data.path+"' data-mytreemac='"+nodeData.data.mac+"'><i class='fa fa-"+ collapseExpandIcon +" pointer'></i></div>" : "";
|
||||
statusCss = " netStatus-" + nodeData.data.status;
|
||||
@@ -641,26 +649,20 @@
|
||||
|
||||
highlightedCss = nodeData.data.mac == selectedNodeMac ? " highlightedNode" : "";
|
||||
|
||||
return result = "<div class='box "+statusCss+" "+highlightedCss+"' data-mytreemacmain='"+nodeData.data.mac+"' \
|
||||
style='height:"+nodeData.settings.nodeHeight+"px;\
|
||||
width:180px;\
|
||||
display:flex;\
|
||||
flex-direction:column;\
|
||||
justify-content:center;\
|
||||
" + fontSize + "\
|
||||
align-items:center;\
|
||||
border-radius:5px;'\
|
||||
>\
|
||||
return result = `<div class='box ${(nodeData.data.hasChildren)? "pointer":""} ${statusCss} ${highlightedCss}'
|
||||
data-mytreemacmain='${nodeData.data.mac}'
|
||||
style='height:${nodeData.settings.nodeHeight}px;${fontSize}
|
||||
>
|
||||
<div class='netNodeText '>\
|
||||
<strong>" + devicePort + deviceIcon +
|
||||
"<span class='spanNetworkTree anonymizeDev'>"+nodeData.data.name+"</span>\
|
||||
</strong>"
|
||||
+collapseExpandHtml+
|
||||
"</div></div>";
|
||||
<strong>${devicePort} ${deviceIcon}
|
||||
<span class='spanNetworkTree anonymizeDev'>${nodeData.data.name}</span>\
|
||||
</strong>
|
||||
${collapseExpandHtml}
|
||||
</div></div>`;
|
||||
},
|
||||
|
||||
onNodeClick: nodeData => {
|
||||
// console.log(this)
|
||||
console.log(this)
|
||||
},
|
||||
mainAxisNodeSpacing: 'auto',
|
||||
// mainAxisNodeSpacing: 3,
|
||||
@@ -673,8 +675,14 @@
|
||||
idKey: "id",
|
||||
hasFlatData: false,
|
||||
linkWidth: (nodeData) => 3,
|
||||
linkColor: (nodeData) => "#ffcc80",
|
||||
onNodeClick: (nodeData) => handleNodeClick(nodeData),
|
||||
relationnalField: "children",
|
||||
});
|
||||
|
||||
console.log('vvvv')
|
||||
console.log(myHierarchy)
|
||||
console.log('^^^^^^^')
|
||||
|
||||
myTree.refresh(myHierarchy);
|
||||
}
|
||||
@@ -759,10 +767,18 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
function updateLeaf(leafMac,nodeMac)
|
||||
{
|
||||
console.log(leafMac)
|
||||
console.log(nodeMac)
|
||||
saveData('updateNetworkLeaf', leafMac, nodeMac);
|
||||
setTimeout("location.reload();", 1000); // refresh page after 1s
|
||||
console.log(leafMac) // child
|
||||
console.log(nodeMac) // parent
|
||||
|
||||
// prevent the assignment of the Internet root node avoiding recursion when generating the network tree topology
|
||||
if(leafMac.toLowerCase().includes('internet'))
|
||||
{
|
||||
showMessage(getString('Network_Cant_Assign'))
|
||||
}
|
||||
else{
|
||||
saveData('updateNetworkLeaf', leafMac, nodeMac);
|
||||
setTimeout("location.reload();", 500); // refresh page
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,10 +50,7 @@
|
||||
case 'getOwners': getOwners(); break;
|
||||
case 'getDeviceTypes': getDeviceTypes(); break;
|
||||
case 'getGroups': getGroups(); break;
|
||||
case 'getLocations': getLocations(); break;
|
||||
case 'getPholus': getPholus(); break;
|
||||
case 'getNmap': getNmap(); break;
|
||||
case 'saveNmapPort': saveNmapPort(); break;
|
||||
case 'getLocations': getLocations(); break;
|
||||
case 'updateNetworkLeaf': updateNetworkLeaf(); break;
|
||||
case 'overwriteIconType': overwriteIconType(); break;
|
||||
case 'getIcons': getIcons(); break;
|
||||
@@ -471,75 +468,66 @@ function ExportCSV() {
|
||||
// Import CSV of devices
|
||||
//------------------------------------------------------------------------------
|
||||
function ImportCSV() {
|
||||
|
||||
|
||||
$file = '../../../config/devices.csv';
|
||||
|
||||
if (file_exists($file)) {
|
||||
|
||||
global $db;
|
||||
|
||||
$skipped = "";
|
||||
$error = "";
|
||||
|
||||
// sql
|
||||
$sql = 'DELETE FROM Devices';
|
||||
|
||||
// execute sql
|
||||
$result = $db->query($sql);
|
||||
|
||||
// Read the CSV file
|
||||
$data = file_get_contents($file);
|
||||
$data = explode("\n", $data);
|
||||
$lines = explode("\n", $data);
|
||||
|
||||
$columns = getDevicesColumns();
|
||||
// Get the column headers from the first line of the CSV
|
||||
$header = str_getcsv(array_shift($lines));
|
||||
$header = array_map('trim', $header);
|
||||
|
||||
// Delete everything form the DB table
|
||||
$sql = 'DELETE FROM Devices';
|
||||
$result = $db->query($sql);
|
||||
|
||||
// Build the SQL statement
|
||||
$sql = "INSERT INTO Devices (" . implode(', ', $header) . ") VALUES ";
|
||||
|
||||
|
||||
// Parse data from CSV file line by line (max 10000 lines)
|
||||
$index = 0;
|
||||
foreach($data as $row)
|
||||
{
|
||||
// Check if not empty and skipping first line
|
||||
$rowArray = explode(',',$row);
|
||||
foreach($lines as $row) {
|
||||
$rowArray = str_getcsv($row);
|
||||
|
||||
if(count($rowArray) > 23)
|
||||
{
|
||||
$cleanMac = str_replace("\"","",$rowArray[0]);
|
||||
|
||||
if(filter_var($cleanMac , FILTER_VALIDATE_MAC) == True || $cleanMac == "Internet")
|
||||
{
|
||||
$sql = "INSERT INTO Devices (".implode(',', $columns).") VALUES (" . $row.")";
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result != TRUE) {
|
||||
$error = $db->lastErrorMsg();
|
||||
// break the while loop on error
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else{
|
||||
$skipped = $skipped . ($index+1) . ",";
|
||||
if (count($rowArray) === count($header)) {
|
||||
// Make sure the number of columns matches the header
|
||||
$rowArray = array_map(function ($value) {
|
||||
return "'" . SQLite3::escapeString(trim($value)) . "'";
|
||||
}, $rowArray);
|
||||
|
||||
$sql .= "(" . implode(', ', $rowArray) . "), ";
|
||||
} else {
|
||||
$skipped .= ($index + 1) . ",";
|
||||
}
|
||||
$index = $index + 1;
|
||||
}
|
||||
|
||||
if($error == "")
|
||||
{
|
||||
// import succesful
|
||||
echo lang('BackDevices_DBTools_ImportCSV') . " (Skipped lines: " .$skipped .") ";
|
||||
|
||||
$index++;
|
||||
}
|
||||
else{
|
||||
// an error occurred while writing to the DB, display the last error message
|
||||
echo lang('BackDevices_DBTools_ImportCSVError')."\n".$error."\n$sql \n\n".$result;
|
||||
|
||||
// Remove the trailing comma and space from SQL
|
||||
$sql = rtrim($sql, ', ');
|
||||
|
||||
// Execute the SQL query
|
||||
$result = $db->query($sql);
|
||||
|
||||
if($error === "") {
|
||||
// Import successful
|
||||
echo lang('BackDevices_DBTools_ImportCSV') . " (Skipped lines: " . $skipped . ") ";
|
||||
} else {
|
||||
// An error occurred while writing to the DB, display the last error message
|
||||
echo lang('BackDevices_DBTools_ImportCSVError') . "\n" . $error . "\n" . $sql . "\n\n" . $result;
|
||||
}
|
||||
|
||||
} else {
|
||||
} else {
|
||||
echo lang('BackDevices_DBTools_ImportCSVMissing');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Query total numbers of Devices by status
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -766,8 +754,13 @@ function getOwners() {
|
||||
function getNetworkNodes() {
|
||||
global $db;
|
||||
|
||||
// Device Data
|
||||
$sql = 'SELECT * FROM Devices WHERE dev_DeviceType in ( "AP", "Gateway", "Firewall", "Hypervisor", "Powerline", "Switch", "WLAN", "PLC", "Router","USB LAN Adapter", "USB WIFI Adapter")';
|
||||
// Device Data
|
||||
$networkDeviceTypes = str_replace("]", "",(str_replace("[", "", getSettingValue("NETWORK_DEVICE_TYPES"))));
|
||||
|
||||
|
||||
$sql = 'SELECT * FROM Devices WHERE dev_DeviceType in ( '. $networkDeviceTypes .' )';
|
||||
|
||||
// echo $sql;
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@@ -1010,134 +1003,11 @@ function getLocations() {
|
||||
echo (json_encode ($tableData));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Query the List of Pholus entries
|
||||
//------------------------------------------------------------------------------
|
||||
function getPholus() {
|
||||
global $db;
|
||||
|
||||
// SQL
|
||||
$mac = $_REQUEST['mac'];
|
||||
|
||||
if ($mac == "Internet") // Not performing data lookup for router (improvement idea for later maybe)
|
||||
{
|
||||
echo "false";
|
||||
return;
|
||||
}
|
||||
|
||||
if (false === filter_var($mac , FILTER_VALIDATE_MAC)) {
|
||||
throw new Exception('Invalid mac address');
|
||||
}
|
||||
else{
|
||||
$sql = 'SELECT * from Pholus_Scan where MAC ="'.$mac.'" and Record_Type not in ("Question")';
|
||||
|
||||
// array
|
||||
$tableData = array();
|
||||
|
||||
// execute query
|
||||
$result = $db->query($sql);
|
||||
while ($row = $result -> fetchArray (SQLITE3_ASSOC)){
|
||||
// Push row data
|
||||
$tableData[] = array( 'Index' => $row['Index'],
|
||||
'Info' => $row['Info'],
|
||||
'Time' => $row['Time'],
|
||||
'MAC' => $row['MAC'],
|
||||
'IP_v4_or_v6' => $row['IP_v4_or_v6'],
|
||||
'Record_Type' => $row['Record_Type'],
|
||||
'Value' => $row['Value'],
|
||||
'Extra' => $row['Extra']);
|
||||
}
|
||||
|
||||
if(count($tableData) == 0)
|
||||
{
|
||||
echo "false";
|
||||
} else{
|
||||
// Return json
|
||||
echo (json_encode ($tableData));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Query the List of Nmap entries
|
||||
//------------------------------------------------------------------------------
|
||||
function getNmap() {
|
||||
global $db;
|
||||
|
||||
// SQL
|
||||
$mac = $_REQUEST['mac'];
|
||||
|
||||
if ($mac == "Internet") // Not performing data lookup for router (improvement idea for later maybe)
|
||||
{
|
||||
echo "false";
|
||||
return;
|
||||
}
|
||||
|
||||
if (false === filter_var($mac , FILTER_VALIDATE_MAC)) {
|
||||
throw new Exception('Invalid mac address');
|
||||
}
|
||||
else{
|
||||
// $sql = 'SELECT * from Nmap_Scan where MAC ="'.$mac.'" ';
|
||||
$sql = 'select * from (select * from Nmap_Scan INNER JOIN Devices on Nmap_Scan.MAC = Devices.dev_MAC) where MAC = "'.$mac.'" ';
|
||||
|
||||
// array
|
||||
$tableData = array();
|
||||
|
||||
// execute query
|
||||
$result = $db->query($sql);
|
||||
while ($row = $result -> fetchArray (SQLITE3_ASSOC)){
|
||||
// Push row data
|
||||
$tableData[] = array( 'Index' => $row['Index'],
|
||||
'MAC' => $row['MAC'],
|
||||
'Port' => $row['Port'],
|
||||
'Time' => $row['Time'],
|
||||
'State' => $row['State'],
|
||||
'Service' => $row['Service'],
|
||||
'IP' => $row['dev_LastIP'],
|
||||
'Extra' => $row['Extra']);
|
||||
}
|
||||
|
||||
if(count($tableData) == 0)
|
||||
{
|
||||
echo "false";
|
||||
} else{
|
||||
// Return json
|
||||
echo (json_encode ($tableData));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
||||
function saveNmapPort()
|
||||
{
|
||||
|
||||
$portIndex = $_REQUEST['id'];
|
||||
$value = $_REQUEST['value'];
|
||||
|
||||
if(is_integer((int)$portIndex))
|
||||
{
|
||||
global $db;
|
||||
// sql
|
||||
$sql = 'UPDATE Nmap_Scan SET "Extra" = "'. $value .'" WHERE "Index"=' . $portIndex ;
|
||||
// update Data
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result == TRUE) {
|
||||
echo 'OK';
|
||||
} else {
|
||||
echo 'KO';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
function updateNetworkLeaf()
|
||||
{
|
||||
$nodeMac = $_REQUEST['value'];
|
||||
$leafMac = $_REQUEST['id'];
|
||||
$nodeMac = $_REQUEST['value']; // parent
|
||||
$leafMac = $_REQUEST['id']; // child
|
||||
|
||||
if ((false === filter_var($nodeMac , FILTER_VALIDATE_MAC) && $nodeMac != "Internet" && $nodeMac != "") || false === filter_var($leafMac , FILTER_VALIDATE_MAC) ) {
|
||||
throw new Exception('Invalid mac address');
|
||||
|
||||
49
front/php/server/internetinfo.php
Executable file
49
front/php/server/internetinfo.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
###################################################################################
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# internetinfo.php # Front module. Server side. System Information #
|
||||
###################################################################################
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob#sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
###################################################################################
|
||||
|
||||
// Get init.php
|
||||
require dirname(__FILE__).'/../server/init.php';
|
||||
|
||||
// Perform a test with the PING command
|
||||
$output = shell_exec("curl ipinfo.io");
|
||||
|
||||
// Check if there is error
|
||||
if (!isset($output) || empty($output)) {
|
||||
// Error message
|
||||
$output = lang('DevDetail_Tab_Tool_Internet_Info_Error');
|
||||
// Show the result
|
||||
echo "<pre>";
|
||||
echo $output;
|
||||
echo "</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Replace "{" with ""
|
||||
$output = str_replace("{", "", $output);
|
||||
|
||||
// Replace "}" with ""
|
||||
$output = str_replace("}", "", $output);
|
||||
|
||||
// Replace "," with ""
|
||||
$output = str_replace(",", "", $output);
|
||||
|
||||
// Replace '"' with ""
|
||||
$output = str_replace('"', "", $output);
|
||||
|
||||
// Show the result
|
||||
echo "<pre>";
|
||||
echo $output;
|
||||
echo "</pre>";
|
||||
|
||||
?>
|
||||
40
front/php/server/nslookup.php
Executable file
40
front/php/server/nslookup.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
###################################################################################
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# nslookup.php # Front module. Server side. System Information #
|
||||
###################################################################################
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob#sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
###################################################################################
|
||||
|
||||
// Get init.php
|
||||
require dirname(__FILE__).'/../server/init.php';
|
||||
|
||||
// Get IP
|
||||
$ip = $_GET['ip'];
|
||||
|
||||
// Check if IP is valid
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||
// Error message
|
||||
$output = lang('DevDetail_Tab_Tools_Nslookup_Error');
|
||||
// Show the result
|
||||
echo "<pre>";
|
||||
echo $output;
|
||||
echo "</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Test with the "nslookup" command
|
||||
$output = shell_exec("nslookup $ip");
|
||||
|
||||
// Show the result
|
||||
echo "<pre>";
|
||||
echo $output;
|
||||
echo "</pre>";
|
||||
|
||||
?>
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
require dirname(__FILE__).'/../server/init.php';
|
||||
exec('../../../back/speedtest-cli --secure --simple', $output);
|
||||
|
||||
echo '<h4>Speedtest Results</h4>';
|
||||
echo '<h4>'. lang('Speedtest_Results') .'</h4>';
|
||||
echo '<pre style="border: none;">';
|
||||
foreach($output as $line){
|
||||
echo $line . "\n";
|
||||
}
|
||||
echo '</pre>';
|
||||
?>
|
||||
?>
|
||||
|
||||
40
front/php/server/traceroute.php
Executable file
40
front/php/server/traceroute.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
###################################################################################
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# traceroute.php # Front module. Server side. System Information #
|
||||
###################################################################################
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
###################################################################################
|
||||
|
||||
// Get init.php
|
||||
require dirname(__FILE__).'/../server/init.php';
|
||||
|
||||
// Get IP
|
||||
$ip = $_GET['ip'];
|
||||
|
||||
// Check if IP is valid
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||
// Error message
|
||||
$output = lang('DevDetail_Tab_Tools_Traceroute_Error');
|
||||
// Show the result
|
||||
echo "<pre>";
|
||||
echo $output;
|
||||
echo "</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Test with the "Traceroute" command
|
||||
$output = shell_exec("traceroute $ip");
|
||||
|
||||
// Show the result
|
||||
echo "<pre>";
|
||||
echo $output;
|
||||
echo "</pre>";
|
||||
|
||||
?>
|
||||
@@ -202,7 +202,7 @@ function cleanLog($logFile)
|
||||
|
||||
$path = "";
|
||||
|
||||
$allowedFiles = ['pialert.log', 'pialert_front.log', 'IP_changes.log', 'stdout.log', 'stderr.log', "pialert_pholus_lastrun.log"];
|
||||
$allowedFiles = ['pialert.log', 'pialert_front.log', 'IP_changes.log', 'stdout.log', 'stderr.log', "pialert_pholus_lastrun.log", 'pialert.php_errors.log'];
|
||||
|
||||
if(in_array($logFile, $allowedFiles))
|
||||
{
|
||||
@@ -229,7 +229,7 @@ function saveSettings()
|
||||
{
|
||||
global $SETTINGS, $FUNCTION, $config_file, $fullConfPath, $configFolderPath, $timestamp;
|
||||
|
||||
// save in the file
|
||||
// save to the file
|
||||
$new_name = $config_file.'_'.$timestamp.'.backup';
|
||||
$new_location = $configFolderPath.$new_name;
|
||||
|
||||
@@ -259,56 +259,68 @@ function saveSettings()
|
||||
$txt = $txt."#-----------------AUTOGENERATED FILE-----------------#\n";
|
||||
|
||||
// collect all groups
|
||||
foreach ($SETTINGS as $setting) {
|
||||
|
||||
$decodedSettings = json_decode($SETTINGS, true);
|
||||
|
||||
foreach ($decodedSettings as $setting) {
|
||||
if( in_array($setting[0] , $groups) == false) {
|
||||
array_push($groups ,$setting[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// go thru the groups and prepare settings to write to file
|
||||
foreach($groups as $group)
|
||||
{
|
||||
$txt = $txt."\n\n# ".$group;
|
||||
$txt = $txt."\n#---------------------------\n" ;
|
||||
foreach($SETTINGS as $setting)
|
||||
{
|
||||
if($group == $setting[0])
|
||||
{
|
||||
if($setting[2] == 'text' or $setting[2] == 'password' or $setting[2] == 'readonly' or $setting[2] == 'text.select')
|
||||
{
|
||||
$val = encode_single_quotes($setting[3]);
|
||||
$txt = $txt.$setting[1]."='".$val."'\n" ;
|
||||
} elseif($setting[2] == 'integer' or $setting[2] == 'integer.select')
|
||||
{
|
||||
$txt = $txt.$setting[1]."=".$setting[3]."\n" ;
|
||||
} elseif($setting[2] == 'boolean')
|
||||
{
|
||||
$val = "False";
|
||||
if($setting[3] == 'true')
|
||||
{
|
||||
$val = "True";
|
||||
}
|
||||
$txt = $txt.$setting[1]."=".$val."\n" ;
|
||||
}elseif($setting[2] == 'text.multiselect' or $setting[2] == 'subnets' or $setting[2] == 'list')
|
||||
{
|
||||
$temp = '[';
|
||||
|
||||
if (count($setting) > 3 && is_array( $setting[3]) == True){
|
||||
foreach($setting[3] as $val)
|
||||
{
|
||||
$temp = $temp."'". encode_single_quotes($val)."',";
|
||||
foreach ($groups as $group) {
|
||||
$txt .= "\n\n# " . $group;
|
||||
$txt .= "\n#---------------------------\n";
|
||||
|
||||
foreach ($decodedSettings as $setting) {
|
||||
$settingGroup = $setting[0];
|
||||
$settingKey = $setting[1];
|
||||
$settingType = $setting[2];
|
||||
$settingValue = $setting[3];
|
||||
|
||||
if ($group == $settingGroup) {
|
||||
if ($settingType == 'text' || $settingType == 'password' || $settingType == 'readonly' || $settingType == 'text.select') {
|
||||
$val = encode_single_quotes($settingValue);
|
||||
$txt .= $settingKey . "='" . $val . "'\n";
|
||||
} elseif ($settingType == 'integer' || $settingType == 'integer.select') {
|
||||
$txt .= $settingKey . "=" . $settingValue . "\n";
|
||||
} elseif ($settingType == 'boolean' || $settingType == 'integer.checkbox') {
|
||||
|
||||
if ($settingValue === true || $settingValue === 1 || strtolower($settingValue) === 'true') {
|
||||
$val = "True";
|
||||
} else {
|
||||
$val = "False";
|
||||
}
|
||||
|
||||
$txt .= $settingKey . "=" . $val . "\n";
|
||||
} elseif ($settingType == 'text.multiselect' || $settingType == 'subnets' || $settingType == 'list') {
|
||||
$temp = '';
|
||||
|
||||
if(is_array($settingValue) == FALSE)
|
||||
{
|
||||
$settingValue = json_decode($settingValue);
|
||||
}
|
||||
|
||||
if (count($setting) > 3 && is_array($settingValue) == true) {
|
||||
foreach ($settingValue as $val) {
|
||||
$temp .= "'" . encode_single_quotes($val) . "',";
|
||||
}
|
||||
|
||||
$temp = substr_replace($temp, "", -1); // remove last comma ','
|
||||
}
|
||||
|
||||
$temp = '['.$temp.']'; // wrap brackets
|
||||
$txt .= $settingKey . "=" . $temp . "\n";
|
||||
} elseif ($settingType == 'json') {
|
||||
$txt .= $settingKey . "=" . $settingValue . "\n";
|
||||
}
|
||||
|
||||
$temp = substr_replace($temp, "", -1); // remove last comma ','
|
||||
}
|
||||
|
||||
$temp = $temp.']'; // close brackets
|
||||
$txt = $txt.$setting[1]."=".$temp."\n" ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$txt = $txt."\n\n";
|
||||
$txt = $txt."#-------------------IMPORTANT INFO-------------------#\n";
|
||||
$txt = $txt."# This file is ingested by a python script, so if #\n";
|
||||
@@ -316,13 +328,11 @@ function saveSettings()
|
||||
$txt = $txt."#-------------------IMPORTANT INFO-------------------#\n";
|
||||
|
||||
// open new file and write the new configuration
|
||||
$newConfig = fopen($fullConfPath, "w") or die("Unable to open file!");
|
||||
$newConfig = fopen($fullConfPath, "w") or die("Unable to open file!");
|
||||
fwrite($newConfig, $txt);
|
||||
fclose($newConfig);
|
||||
|
||||
displayMessage("<br/>Settings saved to the <code>".$config_file."</code> file.
|
||||
<br/><br/>Backup of the previous ".$config_file." created here: <br/><br/><code>".$new_name."</code><br/><br/>
|
||||
<b>Note:</b> Wait at least <b>5s</b> for the changes to reflect in the UI. (longer if for example a <a href='#state'>Scan is running</a>)",
|
||||
displayMessage("<br/>Settings saved to the <code>pialert.conf</code> file.<br/><br/>A time-stamped backup of the previous file created. <br/><br/> Reloading...<br/>",
|
||||
FALSE, TRUE, TRUE, TRUE);
|
||||
|
||||
}
|
||||
@@ -339,6 +349,38 @@ function getString ($codeName, $default) {
|
||||
|
||||
return $default;
|
||||
}
|
||||
// -------------------------------------------------------------------------------------------
|
||||
function getSettingValue($codeName) {
|
||||
// Define the JSON endpoint URL
|
||||
$url = dirname(__FILE__).'/../../../front/api/table_settings.json';
|
||||
|
||||
// Fetch the JSON data
|
||||
$json = file_get_contents($url);
|
||||
|
||||
// Check if the JSON data was successfully fetched
|
||||
if ($json === false) {
|
||||
return 'Could not get json data';
|
||||
}
|
||||
|
||||
// Decode the JSON data
|
||||
$data = json_decode($json, true);
|
||||
|
||||
// Check if the JSON decoding was successful
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
return 'Could not decode json data';
|
||||
}
|
||||
|
||||
// Search for the setting by Code_Name
|
||||
foreach ($data['data'] as $setting) {
|
||||
if ($setting['Code_Name'] === $codeName) {
|
||||
return $setting['Value'];
|
||||
// echo $setting['Value'];
|
||||
}
|
||||
}
|
||||
|
||||
// Return false if the setting was not found
|
||||
return 'Could not find setting '.$codeName;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -353,10 +395,39 @@ function encode_single_quotes ($val) {
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
||||
function getDateFromPeriod () {
|
||||
$period = $_REQUEST['period'];
|
||||
return '"'. date ('Y-m-d', strtotime ('+1 day -'. $period) ) .'"';
|
||||
|
||||
$periodDate = $_REQUEST['period'];
|
||||
|
||||
$periodDateSQL = "";
|
||||
$days = "";
|
||||
|
||||
switch ($periodDate) {
|
||||
case '7 days':
|
||||
$days = "7";
|
||||
break;
|
||||
case '1 month':
|
||||
$days = "30";
|
||||
break;
|
||||
case '1 year':
|
||||
$days = "365";
|
||||
break;
|
||||
case '100 years':
|
||||
$days = "3650"; //10 years
|
||||
break;
|
||||
default:
|
||||
$days = "1";
|
||||
}
|
||||
|
||||
$periodDateSQL = "-".$days." day";
|
||||
|
||||
return " date('now', '".$periodDateSQL."') ";
|
||||
|
||||
// $period = $_REQUEST['period'];
|
||||
// return '"'. date ('Y-m-d', strtotime ('+2 day -'. $period) ) .'"';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
function quotes ($text) {
|
||||
return str_replace ('"','""',$text);
|
||||
@@ -380,16 +451,7 @@ function handleNull ($text, $default = "") {
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
// Currently unused - should be source of truth for network types (or define somewhere else?)
|
||||
function getNetworkTypes(){
|
||||
|
||||
$array = array(
|
||||
"AP", "Gateway", "Firewall", "Hypervisor", "Powerline", "Switch", "WLAN", "PLC", "Router","USB LAN Adapter", "USB WIFI Adapter"
|
||||
);
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
function getDevicesColumns(){
|
||||
|
||||
13
front/php/server/utilDB.php
Executable file
13
front/php/server/utilDB.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<!-- utils needing a DB connection -->
|
||||
|
||||
<?php
|
||||
|
||||
require dirname(__FILE__).'/init.php';
|
||||
|
||||
// Action functions
|
||||
if (isset ($_REQUEST['key']))
|
||||
{
|
||||
echo lang($_REQUEST['key']);
|
||||
}
|
||||
|
||||
?>
|
||||
21
front/php/templates/build.php
Executable file
21
front/php/templates/build.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# build.php - Templates module Template to display the current build version #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
|
||||
$file = "/home/pi/pialert/front/buildtimestamp.txt";
|
||||
if (file_exists($file)) {
|
||||
echo date("Y-m-d", ((int)file_get_contents($file)));
|
||||
}
|
||||
else {
|
||||
echo "File not found";
|
||||
}
|
||||
?>
|
||||
@@ -1,56 +1,34 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# footer.php - Front module. Common footer to all the web pages
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# footer.php - Front module. Common footer to all the web pages #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<!-- Main Footer -->
|
||||
<footer class="main-footer">
|
||||
<!-- Default to the left -->
|
||||
|
||||
<!-- © 2020 Puche -->
|
||||
<span style="display:inline-block; transform: rotate(180deg)">©</span>
|
||||
|
||||
|
||||
|
||||
2020 Puche (2022+ <a href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b>Built on: </b>
|
||||
|
||||
<?php
|
||||
|
||||
echo date("Y-m-d", ((int)file_get_contents( "buildtimestamp.txt")));
|
||||
|
||||
?>
|
||||
|
||||
| <b> Version: </b>
|
||||
|
||||
<?php
|
||||
|
||||
$filename = "/.VERSION";
|
||||
|
||||
if(file_exists($filename))
|
||||
{
|
||||
echo file_get_contents($filename);
|
||||
}
|
||||
else{
|
||||
echo "File not found";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
<!-- © 2022 jokob-sk -->
|
||||
<span style="display:inline-block; transform: rotate(180deg)">©</span>
|
||||
2020 Puche (2022+ <a href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b><?= lang('Maintenance_built_on');?>: </b>
|
||||
<?php include 'php/templates/build.php'; ?> | <b> Version: </b> <?php include 'php/templates/version.php'; ?> |
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank"><span>Docs <i class="fa fa-circle-question"></i></a>
|
||||
<span>
|
||||
|
||||
<!-- To the right -->
|
||||
<div class="pull-right no-hidden-xs">
|
||||
|
||||
<!-- Pi.Alert 2.50 <small>(2019-12-30)</small> -->
|
||||
<?php
|
||||
echo 'Pi.Alert';
|
||||
?>
|
||||
<!-- Pi.Alert footer with url -->
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert" target="_blank">Pi.Alert</a>
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -60,9 +38,7 @@
|
||||
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="lib/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
|
||||
|
||||
@@ -83,8 +83,13 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<script>
|
||||
|
||||
function updateState(){
|
||||
getParam("state","Back_App_State", true)
|
||||
setTimeout("updateState()", 5000);
|
||||
$.get('api/app_state.json?nocache=' + Date.now(), function(appState) {
|
||||
|
||||
document.getElementById('state').innerHTML = appState["currentState"].replaceAll('"', '');
|
||||
|
||||
setTimeout("updateState()", 1000);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function show_pia_servertime() {
|
||||
@@ -99,12 +104,6 @@ if ($ENABLED_DARKMODE === True) {
|
||||
setTimeout("show_pia_servertime()", 1000);
|
||||
}
|
||||
|
||||
// refresh page on focus - adds a lot of SQL queries overhead onto the DB - disabling for now
|
||||
// document.addEventListener("visibilitychange",()=>{
|
||||
// if(document.visibilityState==="visible"){
|
||||
// window.location.href = window.location.href.split('#')[0];
|
||||
// }
|
||||
// })
|
||||
|
||||
</script>
|
||||
|
||||
@@ -138,9 +137,25 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<!-- Navbar Right Menu -->
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- Back Button -->
|
||||
<li>
|
||||
<a id="back-button" href="javascript:history.go(-1);" role="button" span class='of-bt-icon'><i class='fa fa-arrow-left'></i></a>
|
||||
</li>
|
||||
<!-- Next Button -->
|
||||
<li>
|
||||
<a id="next-button" href="javascript:history.go(1);" role="button" span class='of-bt-icon'><i class='fa fa-arrow-right'></i></a>
|
||||
</li>
|
||||
<!-- Reload -->
|
||||
<li>
|
||||
<a id="reload-button" href='#' role="button" span class='of-bt-icon' onclick='location.reload()'><i class='fa fa-repeat'></i></a>
|
||||
</li>
|
||||
<!-- Full Screen -->
|
||||
<li>
|
||||
<a id="fullscreen-button" href='#' role="button" span class='of-bt-icon' onclick='toggleFullscreen()'><i class='fa fa-arrows-alt'></i></a>
|
||||
</li>
|
||||
<!-- Server Status -->
|
||||
<li>
|
||||
<a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="/maintenance.php#tab_Logging">
|
||||
<a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="maintenance.php#tab_Logging">
|
||||
<div class="header-status">
|
||||
<code id="state"></code>
|
||||
</div>
|
||||
@@ -207,23 +222,27 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('devices.php', 'deviceDetails.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="devices.php"><span><i class="fa fa-laptop"></i> <?= lang('Navigation_Devices');?></span></a>
|
||||
<a href="devices.php"><i class="fa fa-laptop"></i> <span><?= lang('Navigation_Devices');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('presence.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="presence.php"><i class="fa fa-calendar"></i> <?= lang('Navigation_Presence');?></span></a>
|
||||
<a href="presence.php"><i class="fa fa-calendar"></i> <span><?= lang('Navigation_Presence');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('events.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="events.php"><i class="fa fa-bolt"></i> <span><?= lang('Navigation_Events');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('report.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="report.php"><i class="fa fa-flag"></i> <span><?= lang('Navigation_Report');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('network.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="network.php"><span><i class="fa fa-fw fa-network-wired"></i> <?= lang('Navigation_Network');?></span></a>
|
||||
<a href="network.php"><i class="fa fa-fw fa-network-wired"></i> <span><?= lang('Navigation_Network');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('plugins.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="plugins.php"><span><i class="fa fa-fw fa-plug"></i> <?= lang('Navigation_Plugins');?></span></a>
|
||||
<a href="plugins.php"><i class="fa fa-fw fa-plug"></i> <span><?= lang('Navigation_Plugins');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('maintenance.php') ) ){ echo 'active'; } ?>">
|
||||
@@ -233,10 +252,18 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('settings.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="settings.php"><i class="fa fa-cog"></i> <span><?= lang('Navigation_Settings');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('help_faq.php') ) ){ echo 'active'; } ?>">
|
||||
<!-- <li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('flows.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="flows.php"><i class="fa fa-shuffle"></i> <span><?= lang('Navigation_Flows');?></span></a>
|
||||
</li> -->
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="systeminfo.php"><i class="fa fa-microchip"></i> <span><?= lang('Navigation_SystemInfo');?></span></a>
|
||||
</li>
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('help_faq.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="help_faq.php"><i class="fa fa-question"></i> <span><?= lang('Navigation_HelpFAQ');?></span></a>
|
||||
</li>
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('donations.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="donations.php"><i class="fa fa-heart"></i> <span><?= lang('Navigation_Donations');?></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- /.sidebar-menu -->
|
||||
@@ -249,26 +276,18 @@ if ($ENABLED_DARKMODE === True) {
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
function getParam(targetId, key, skipCache = false) {
|
||||
|
||||
skipCacheQuery = "";
|
||||
function toggleFullscreen() {
|
||||
|
||||
if(skipCache)
|
||||
{
|
||||
skipCacheQuery = "&skipcache";
|
||||
if (document.fullscreenElement) {
|
||||
document.exitFullscreen();
|
||||
}
|
||||
|
||||
// get parameter value
|
||||
$.get('php/server/parameters.php?action=get&defaultValue=NULL¶meter='+ key + skipCacheQuery, function(data) {
|
||||
var result = data;
|
||||
|
||||
document.getElementById(targetId).innerHTML = result.replaceAll('"', '');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
else {
|
||||
document.documentElement.requestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
// Update server time in the header
|
||||
@@ -276,7 +295,5 @@ if ($ENABLED_DARKMODE === True) {
|
||||
|
||||
// Update server state in the header
|
||||
updateState()
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
428
front/php/templates/language/de_de.json
Executable file
428
front/php/templates/language/de_de.json
Executable file
@@ -0,0 +1,428 @@
|
||||
{
|
||||
"de_de":{
|
||||
"About_Title":"Open Source Network Guard",
|
||||
"About_Design":"Designed for:",
|
||||
"About_Exit":"Sign out",
|
||||
"Gen_Delete":"Löschen",
|
||||
"Gen_Cancel":"Abbrechen",
|
||||
"Gen_Okay":"Ok",
|
||||
"Gen_Purge":"Aufräumen",
|
||||
"Gen_Backup":"Sichern",
|
||||
"Gen_Restore":"Wiederherstellen",
|
||||
"Gen_Switch":"Umschalten",
|
||||
"Gen_AreYouSure":"Sind Sie sich sicher?",
|
||||
"Login_Box":"Passwort eingeben",
|
||||
"Login_Remember":"Passwort speichern",
|
||||
"Login_Remember_small":"(für 7 Tage gültig)",
|
||||
"Login_Submit":"Anmelden",
|
||||
"Login_Psw_run":"Um das Passwort zu ändern nutze:",
|
||||
"Login_Psw_new":"neues_passwort",
|
||||
"Login_Psw_folder":"im Ordner ~/pialert/config",
|
||||
"Login_Psw_alert":"Sicherheitshinweis!",
|
||||
"Login_Psw-box":"Passwort",
|
||||
"Login_Toggle_Info":"Passwort Informationen",
|
||||
"Login_Toggle_Info_headline":"Passwort Information",
|
||||
"Login_Toggle_Alert_headline":"Passwort Warnung!",
|
||||
"Navigation_Devices":"Geräte",
|
||||
"Navigation_Presence":"Anwesenheit",
|
||||
"Navigation_Events":"Ereignisse",
|
||||
"Navigation_Report":"Bericht",
|
||||
"Navigation_Maintenance":"Wartung",
|
||||
"Navigation_Settings":"Einstellung",
|
||||
"Navigation_SystemInfo":"System info",
|
||||
"Navigation_Network":"Netzwerk",
|
||||
"Navigation_HelpFAQ":"Hilfe / FAQ",
|
||||
"Device_Title":"Geräte",
|
||||
"Device_Shortcut_AllDevices":"Alle Geräte",
|
||||
"Device_Shortcut_Connected":"Verbunden",
|
||||
"Device_Shortcut_Favorites":"Favoriten",
|
||||
"Device_Shortcut_NewDevices":"Neue Geräte",
|
||||
"Device_Shortcut_DownAlerts":"Down Meldungen",
|
||||
"Device_Shortcut_Archived":"Archiviert",
|
||||
"Device_Shortcut_Devices":"Geräte",
|
||||
"Device_Shortcut_OnlineChart":"Gerätepräsenz im Laufe der Zeit",
|
||||
"Device_TableHead_Name":"Name",
|
||||
"Device_TableHead_Owner":"Eigentümer",
|
||||
"Device_TableHead_Type":"Typ",
|
||||
"Device_TableHead_Favorite":"Favorit",
|
||||
"Device_TableHead_Group":"Gruppe",
|
||||
"Device_TableHead_FirstSession":"Erste Sitzg.",
|
||||
"Device_TableHead_LastSession":"Letzte Sitzg.",
|
||||
"Device_TableHead_LastIP":"Letzte IP",
|
||||
"Device_TableHead_MAC":"MAC",
|
||||
"Device_TableHead_LastIPOrder":"Last IP Order",
|
||||
"Device_TableHead_Rowid":"Zeilennummer",
|
||||
"Device_TableHead_Status":"Status",
|
||||
"Device_Searchbox":"Suche",
|
||||
"Device_Tablelenght":"Zeige _MENU_ Einträge",
|
||||
"Device_Tablelenght_all":"Alle",
|
||||
"Device_Table_info":"Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"Device_Table_nav_next":"Nächste",
|
||||
"Device_Table_nav_prev":"Zurück",
|
||||
"Presence_Title":"Anwesenheit pro Gerät",
|
||||
"Presence_Loading":"Laden...",
|
||||
"Loading":"Laden...",
|
||||
"Presence_Shortcut_AllDevices":"Alle Geräte",
|
||||
"Presence_Shortcut_Connected":"Verbunden",
|
||||
"Presence_Shortcut_Favorites":"Favoriten",
|
||||
"Presence_Shortcut_NewDevices":"Neue Geräte",
|
||||
"Presence_Shortcut_DownAlerts":"Down Meldungen",
|
||||
"Presence_Shortcut_Archived":"Archiviert",
|
||||
"Presence_Shortcut_Devices":"Geräte",
|
||||
"Presence_CallHead_Devices":"Geräte",
|
||||
"Presence_CalHead_lang":"de",
|
||||
"Presence_CalHead_year":"Jahr",
|
||||
"Presence_CalHead_quarter":"Quartal",
|
||||
"Presence_CalHead_month":"Monat",
|
||||
"Presence_CalHead_week":"Woche",
|
||||
"Events_Title":"Ereignisse",
|
||||
"Events_Loading":"Laden...",
|
||||
"Events_Periodselect_today":"Heute",
|
||||
"Events_Periodselect_LastWeek":"Letzte Woche",
|
||||
"Events_Periodselect_LastMonth":"Letzter Monat",
|
||||
"Events_Periodselect_LastYear":"Letztes Jahr",
|
||||
"Events_Periodselect_All":"Alle Ereignisse",
|
||||
"Events_Shortcut_AllEvents":"Alle Ereignisse",
|
||||
"Events_Shortcut_Sessions":"Sitzungen",
|
||||
"Events_Shortcut_MissSessions":"fehlende Sitzungen",
|
||||
"Events_Shortcut_VoidSessions":"beendete Sitzungen",
|
||||
"Events_Shortcut_NewDevices":"Neue Geräte",
|
||||
"Events_Shortcut_DownAlerts":"Down Meldungen",
|
||||
"Events_Shortcut_Events":"Ereignisse",
|
||||
"Events_TableHead_Order":"Order",
|
||||
"Events_TableHead_Device":"Gerät",
|
||||
"Events_TableHead_Owner":"Eigentümer",
|
||||
"Events_TableHead_Date":"Datum",
|
||||
"Events_TableHead_EventType":"Ereignis Typ",
|
||||
"Events_TableHead_Connection":"Verbindung",
|
||||
"Events_TableHead_Disconnection":"Trennung",
|
||||
"Events_TableHead_Duration":"Dauer",
|
||||
"Events_TableHead_DurationOrder":"Duration Order",
|
||||
"Events_TableHead_IP":"IP",
|
||||
"Events_TableHead_IPOrder":"IP Order",
|
||||
"Events_TableHead_AdditionalInfo":"Zusätzliche Info",
|
||||
"Events_Searchbox":"Suche",
|
||||
"Events_Tablelenght":"Zeige _MENU_ Einträge",
|
||||
"Events_Tablelenght_all":"Alle",
|
||||
"Events_Table_info":"Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"Events_Table_nav_next":"Nächste",
|
||||
"Events_Table_nav_prev":"Zurück",
|
||||
"DevDetail_Loading":"Laden ...",
|
||||
"DevDetail_Periodselect_today":"Heute",
|
||||
"DevDetail_Periodselect_LastWeek":"Letzte Woche",
|
||||
"DevDetail_Periodselect_LastMonth":"Letzter Monat",
|
||||
"DevDetail_Periodselect_LastYear":"Letztes Jahr",
|
||||
"DevDetail_Periodselect_All":"Alle Infos",
|
||||
"DevDetail_Shortcut_CurrentStatus":"aktueller Status",
|
||||
"DevDetail_Shortcut_Sessions":"Sitzungen",
|
||||
"DevDetail_Shortcut_Presence":"Anwesenheit",
|
||||
"DevDetail_Shortcut_DownAlerts":"Down Meldungen",
|
||||
"DevDetail_Tab_Details":"Details",
|
||||
"DevDetail_Tab_Tools":"<i class=\"fa fa-screwdriver-wrench\"></i> Tools",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Title":"Internetinformationen",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Description":"Das Internet-Info-Tool zeigt Informationen über die Internetverbindung an, wie z. B. IP-Adresse, Stadt, Land, Ortsvorwahl und Zeitzone.",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Start":"Internet-Info starten",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Error":"Es ist ein Fehler aufgetreten",
|
||||
"DevDetail_Tab_Tools_Nslookup_Title":"Nslookup",
|
||||
"DevDetail_Tab_Tools_Nslookup_Description":"Nslookup ist ein Befehlszeilentool zur Abfrage des Domain Name System (DNS). DNS ist ein System, das Domainnamen wie www.google.com in IP-Adressen wie 172.217.0.142 übersetzt. ",
|
||||
"DevDetail_Tab_Tools_Nslookup_Start":"Nslookup starten",
|
||||
"DevDetail_Tab_Tools_Nslookup_Error":"Fehler: IP-Adresse ist ungültig",
|
||||
"DevDetail_Tab_Tools_Speedtest_Title":"Speedtest test",
|
||||
"DevDetail_Tab_Tools_Speedtest_Description":"Das Speedtest-Tool misst die Download-Geschwindigkeit, Upload-Geschwindigkeit und Latenz der Internetverbindung.",
|
||||
"DevDetail_Tab_Tools_Speedtest_Start":"Speedtest starten",
|
||||
"DevDetail_Tab_Tools_Traceroute_Title":"Traceroute",
|
||||
"DevDetail_Tab_Tools_Traceroute_Description":"Traceroute ist ein Netzwerkdiagnosebefehl, mit dem der Pfad verfolgt wird, den Datenpakete von einem Host zu einem anderen nehmen.<br><br>Der Befehl verwendet das Internet Control Message Protocol (ICMP), um Pakete an Zwischenknoten auf der Route zu senden, jeden Zwischenknoten Der Knoten antwortet mit einem ICMP-Timeout-Paket (TTL-Zeitüberschreitung).<br><br>Die Ausgabe des Traceroute-Befehls zeigt die IP-Adresse jedes Zwischenknotens auf der Route an.<br><br>Die Ausgabe der Traceroute Der Befehl zeigt die IP-Adresse jedes Zwischenknotens auf der Route an.<br><br>Der Befehl „traceroute“ kann zur Diagnose von Netzwerkproblemen wie Verzögerungen, Paketverlust und blockierten Routen verwendet werden.<br><br>Das ist auch möglich kann verwendet werden, um den Standort eines Zwischenknotens in einem Netzwerk zu identifizieren.",
|
||||
"DevDetail_Tab_Tools_Traceroute_Start":"Traceroute starten",
|
||||
"DevDetail_Tab_Tools_Traceroute_Error":"Fehler: IP-Adresse ist ungültig",
|
||||
"DevDetail_Tab_Nmap":"Nmap",
|
||||
"DevDetail_Tab_NmapTableIndex":"Index",
|
||||
"DevDetail_Tab_NmapTableTime":"Zeit",
|
||||
"DevDetail_Tab_NmapTablePort":"Port",
|
||||
"DevDetail_Tab_NmapTableState":"Status",
|
||||
"DevDetail_Tab_NmapTableService":"Dienst",
|
||||
"DevDetail_Tab_NmapTableExtra":"Extra",
|
||||
"DevDetail_Tab_Sessions":"Sitzungen",
|
||||
"DevDetail_Tab_Presence":"Anwesenheit",
|
||||
"DevDetail_Tab_Events":"Ereignisse",
|
||||
"DevDetail_Tab_EventsTableDate":"Datum",
|
||||
"DevDetail_Tab_EventsTableEvent":"Ereignistype",
|
||||
"DevDetail_Tab_EventsTableIP":"IP",
|
||||
"DevDetail_Tab_EventsTableInfo":"Zusätzliche Informationen",
|
||||
"DevDetail_MainInfo_Title":"Haupt Infos",
|
||||
"DevDetail_MainInfo_mac":"MAC",
|
||||
"DevDetail_MainInfo_Name":"Name",
|
||||
"DevDetail_MainInfo_Owner":"Eigen-­tümer",
|
||||
"DevDetail_MainInfo_Type":"Typ",
|
||||
"DevDetail_MainInfo_Vendor":"Hersteller",
|
||||
"DevDetail_MainInfo_Favorite":"Favorit",
|
||||
"DevDetail_MainInfo_Group":"Gruppe",
|
||||
"DevDetail_MainInfo_Location":"Standort",
|
||||
"DevDetail_MainInfo_Comments":"Notiz",
|
||||
"DevDetail_MainInfo_Network":"Netzwerk Knoten",
|
||||
"DevDetail_MainInfo_Network_Port":"Netzwerk Knoten Port",
|
||||
"DevDetail_SessionInfo_Title":"Sitzungsinfos",
|
||||
"DevDetail_SessionInfo_Status":"Status",
|
||||
"DevDetail_SessionInfo_FirstSession":"Erste Sitzung",
|
||||
"DevDetail_SessionInfo_LastSession":"Letzte Sitzung",
|
||||
"DevDetail_SessionInfo_LastIP":"Letzte IP",
|
||||
"DevDetail_SessionInfo_StaticIP":"Statische IP",
|
||||
"DevDetail_EveandAl_Title":"Ereignisse & Alarme einstellen",
|
||||
"DevDetail_EveandAl_ScanCycle":"Scan Abstand",
|
||||
"DevDetail_EveandAl_AlertAllEvents":"Melde alle Ereignisse",
|
||||
"DevDetail_EveandAl_AlertDown":"Melde Down",
|
||||
"DevDetail_EveandAl_Skip":"pausiere wiederhol. Meldungen für",
|
||||
"DevDetail_EveandAl_NewDevice":"Neues Gerät",
|
||||
"DevDetail_EveandAl_Archived":"Archivierung",
|
||||
"DevDetail_EveandAl_RandomMAC":"Zufällige MAC",
|
||||
"DevDetail_EveandAl_ScanCycle_a":"Gerät scannen",
|
||||
"DevDetail_EveandAl_ScanCycle_z":"Gerät nicht scannen",
|
||||
"DevDetail_button_Delete":"Lösche Gerät",
|
||||
"DevDetail_button_Reset":"Verwerfen",
|
||||
"DevDetail_button_Save":"Speichern",
|
||||
"DevDetail_button_DeleteEvents":"Lösche Events",
|
||||
"DevDetail_button_DeleteEvents_Warning":"Sind Sie sicher, dass Sie alle Ereignisse dieses Geräts löschen möchten? (dies löscht den Ereignisverlauf und die Sitzungen und könnte bei ständigen (anhaltenden) Benachrichtigungen helfen)",
|
||||
"DevDetail_SessionTable_Order":"Order",
|
||||
"DevDetail_SessionTable_Connection":"Verbindung",
|
||||
"DevDetail_SessionTable_Disconnection":"Trennung",
|
||||
"DevDetail_SessionTable_Duration":"Dauer",
|
||||
"DevDetail_SessionTable_IP":"IP",
|
||||
"DevDetail_SessionTable_Additionalinfo":"Zusätzliche Info",
|
||||
"DevDetail_Events_CheckBox":"Blende Verbindungs-Ereignisse aus",
|
||||
"DevDetail_Nmap_buttonFast":"Schneller Scan",
|
||||
"DevDetail_Nmap_buttonDefault":"Standard Scan",
|
||||
"DevDetail_Nmap_buttonDetail":"Detailierter Scan",
|
||||
"DevDetail_Nmap_buttonFast_text":"Schneller Scan: Überprüft nur die wichtigsten 100 Ports (wenige Sekunden)",
|
||||
"DevDetail_Nmap_buttonDefault_text":"Standard Scan: Nmap scannt die ersten 1.000 Ports für jedes angeforderte Scan-Protokoll. Damit werden etwa 93 % der TCP-Ports und 49 % der UDP-Ports erfasst. (ca. 5-10 Sekunden)",
|
||||
"DevDetail_Nmap_buttonDetail_text":"Detailierter Scan: Standardscan mit aktivierter Betriebssystemerkennung, Versionserkennung, Skript-Scan und Traceroute (bis zu 30 oder mehr Sekunden)",
|
||||
"DevDetail_Nmap_buttonSkipDiscovery":"Ohne Erreichbarkeitsprüfung",
|
||||
"DevDetail_Nmap_buttonSkipDiscovery_text":"Ohne Erreichbarkeitsprüfung (-Pn Parameter): Standard Scan bei dem nmap annimmt, dass der Host erreichbar ist.",
|
||||
"DevDetail_Nmap_Scans":"Nmap Scans",
|
||||
"Maintenance_Title":"Wartungswerkzeuge",
|
||||
"Maintenance_database_path":"Datenbank-Pfad",
|
||||
"Maintenance_database_size":"Datenbank-Größe",
|
||||
"Maintenance_database_lastmod":"Letzte Änderung",
|
||||
"Maintenance_database_backup":"DB Sicherungen",
|
||||
"Maintenance_database_backup_found":"Sicherungen verfügbar",
|
||||
"Maintenance_database_backup_total":"Speicherplatz insgesamt",
|
||||
"Maintenance_arp_status":"Scan Status",
|
||||
"Maintenance_arp_status_off":"ist im Moment deaktiviert",
|
||||
"Maintenance_arp_status_on":"Scan(s) sind gerade aktiv",
|
||||
"Maintenance_themeselector_lable":"Skin Auswahl",
|
||||
"Maintenance_themeselector_empty":"Skin wählen",
|
||||
"Maintenance_themeselector_text":"Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.",
|
||||
"Maintenance_themeselector_apply":"Übernehmen",
|
||||
"Maintenance_lang_selector_lable":"Sprachauswahl",
|
||||
"Maintenance_lang_selector_empty":"Sprache wählen",
|
||||
"Maintenance_lang_en_us":"Englisch (US)",
|
||||
"Maintenance_lang_de_de":"Deutsch (DE)",
|
||||
"Maintenance_lang_es_es":"Spanisch (ES)",
|
||||
"Maintenance_lang_selector_text":"Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.",
|
||||
"Maintenance_lang_selector_apply":"Übernehmen",
|
||||
"Maintenance_Tools_Tab_Settings":"Einstellungen",
|
||||
"Maintenance_Tools_Tab_Tools":"Werkzeuge",
|
||||
"Maintenance_Tools_Tab_BackupRestore":"Sicherg. / Wiederherstellg.",
|
||||
"Maintenance_Tools_Tab_Logging":"Logs",
|
||||
"Maintenance_Tool_darkmode":"Darstellungswechsel (Dunkel/Hell)",
|
||||
"Maintenance_Tool_darkmode_text":"Wechselt zwischen der hellen und der dunklen Darstellung. Wenn der Wechsel nicht richtig funktionieren sollte, versuchen Sie den Browsercache zu löschen. Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.",
|
||||
"Maintenance_Tool_darkmode_noti":"Darstellungswechsel",
|
||||
"Maintenance_Tool_darkmode_noti_text":"Wechselt zwischen der hellen und der dunklen Darstellung. Wenn die Umschaltung nicht ordentlich funktionieren sollte, versuchen Sie den Browsercache zu löschen.",
|
||||
"Maintenance_Tool_arpscansw":"arp-Scan stoppen/starten",
|
||||
"Maintenance_Tool_arpscansw_text":"Schaltet den arp-Scan an oder aus. Wenn der Scan aus ist, bleibt er so lange aus bis er wieder aktiviert wird. Bereits laufende Scans werden dabei nicht beendet.",
|
||||
"Maintenance_Tool_arpscansw_noti":"arp-Scan stoppen/starten",
|
||||
"Maintenance_Tool_arpscansw_noti_text":"Wenn der Scan aus ist, bleibt er so lange aus bis er wieder aktiviert wird.",
|
||||
"Maintenance_Tool_del_empty_macs":"Alle Geräte ohne MAC löschen",
|
||||
"Maintenance_Tool_del_empty_macs_text":"Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Geäte ohne MAC-Adresse werden aus der Datenbank ge­löscht.",
|
||||
"Maintenance_Tool_del_empty_macs_noti":"Geräte löschen",
|
||||
"Maintenance_Tool_del_empty_macs_noti_text":"Sind Sie sicher, dass Sie alle Geräte ohne MAC-Adresse löschen wollen?<br>(Vielleicht bevorzugenn Sie eine Archivierung.)",
|
||||
"Maintenance_Tool_upgrade_database_noti":"Aktualisiere Datenbank",
|
||||
"Maintenance_Tool_upgrade_database_text":"Mit dieser Schaltfläche wird die Datenbank aktualisiert, um das Diagramm der Netzwerkaktivitäten der letzten 12 Stunden zu aktivieren. Bitte sichern Sie Ihre Datenbank, falls Probleme auftreten.",
|
||||
"Maintenance_Tool_upgrade_database_noti_text":"Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen.",
|
||||
"Maintenance_Tool_del_alldev":"Alle Geräte löschen",
|
||||
"Maintenance_Tool_del_alldev_text":"Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Geräte werden in der Datenbank ge­löscht.",
|
||||
"Maintenance_Tool_del_alldev_noti":"Geräte löschen",
|
||||
"Maintenance_Tool_del_alldev_noti_text":"Sind Sie sich sicher, dass Sie alle Geräte löschen wollen?",
|
||||
"Maintenance_Tool_del_unknowndev":"Löschen der (unknown) Geräte",
|
||||
"Maintenance_Tool_del_unknowndev_text":"Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Gräte mit dem Namen (unknown) werden aus der Datenbank ge­löscht.",
|
||||
"Maintenance_Tool_del_unknowndev_noti":"Lösche (unknown) Geräte",
|
||||
"Maintenance_Tool_del_unknowndev_noti_text":"Sind Sie sicher, dass Sie alle (unknown) Geräte aus der Datenbank löschen wollen?",
|
||||
"Maintenance_Tool_del_allevents":"Alle Ereignisse löschen",
|
||||
"Maintenance_Tool_del_allevents_text":"Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Ereignisse werden aus der Datenbank ge­löscht. Dies setzt auch die Anwesenheit zu­rück. Es kann ab dem Moment zu ungültigen Sitzungen kommen. Ein Scan, während das betreffende Gerät online ist, sollte das Problem lösen.",
|
||||
"Maintenance_Tool_del_allevents_noti":"Alle Ereignisse löschen",
|
||||
"Maintenance_Tool_del_allevents_noti_text":"Sind Sie sicher, dass Sie alle Ereignisse aus der Datenbank löschen wollen. Dies setzt die Anwesenheit aller Geräte zurück.",
|
||||
"Maintenance_Tool_backup":"DB Sicherung",
|
||||
"Maintenance_Tool_backup_text":"Die Datenbank-Sicher­ungen befinden sich im Datenbank-Ver­zeich­nis, gepackt als zip-Archive, benannt mit dem Erstellungs­datum. Es gibt keine maximale Anzahl von Backups.",
|
||||
"Maintenance_Tool_backup_noti":"DB Sicherung",
|
||||
"Maintenance_Tool_backup_noti_text":"Sind Sie sicher, dass Sie die Datenbank jetzt sichern möchten. Prüfen Sie, dass gerade keine Scans stattfinden.",
|
||||
"Maintenance_Tool_restore":"DB Wiederherstellung",
|
||||
"Maintenance_Tool_restore_text":"Das neuste Backup kann über diese Funk­tion wiederhergestellt werden. Ältere Sicher­ungen müssen manuell wieder­hergestellt wer­den. Es empfiehlt sich eine Integritäts­prüfung nach der Wieder­her­stellung zu machen, falls die Datenbank bei der Sicherung geöffnet war.",
|
||||
"Maintenance_Tool_restore_noti":"DB Wiederherstellung",
|
||||
"Maintenance_Tool_restore_noti_text":"Sind Sie sicher, dass Sie die Datenbank aus der neusten Sicherung wiederherstellen möchten? Prüfen Sie, dass gerade keine Scans stattfinden.",
|
||||
"Maintenance_Tool_purgebackup":"Sicherungen aufräumen",
|
||||
"Maintenance_Tool_purgebackup_text":"Es werden, bis auf die letzten 3 Backups, alle übrigen Backups gelöscht.",
|
||||
"Maintenance_Tool_purgebackup_noti":"Sicherungen aufräumen",
|
||||
"Maintenance_Tool_purgebackup_noti_text":"Sind Sie sicher, alle Backups, bis auf die letzten 3 löschen möchten?",
|
||||
"Maintenance_Tool_del_ActHistory":"Löschen der Netzwerkaktivität",
|
||||
"Maintenance_Tool_del_ActHistory_text":"Der Graph für die Netzwerkaktivität wird zurückgesetzt. Hierbei werden die Events nicht beeinflusst.",
|
||||
"Maintenance_Tool_del_ActHistory_noti":"Netzwerkaktivität löschen",
|
||||
"Maintenance_Tool_del_ActHistory_noti_text":"Sind Sie sicher, dass Sie die Netzwerkaktivität zurücksetzen möchten?",
|
||||
"BackDevices_Arpscan_disabled":"Automatischer Arp-Scan deaktiviert.",
|
||||
"BackDevices_Arpscan_enabled":"Automatischer Arp-Scan aktiviert.",
|
||||
"BackDevices_darkmode_disabled":"Heller Modus aktiviert.",
|
||||
"BackDevices_darkmode_enabled":"Dunkler Modus aktiviert.",
|
||||
"BackDevices_Restore_CopError":"Die originale Datenbank konnte nicht kopiert werden.",
|
||||
"BackDevices_Restore_okay":"Die Wiederherstellung wurde erfolgreich ausgeführt.",
|
||||
"BackDevices_Restore_Failed":"Die Wiederherstellung ist fehlgeschlagen. Stellen Sie das Backup manuell her.",
|
||||
"BackDevices_Backup_CopError":"Die originale Datenbank konnte nicht gesichert werden.",
|
||||
"BackDevices_Backup_okay":"Das Backup wurde erfolgreich beendet.",
|
||||
"BackDevices_Backup_Failed":"Das Backup wurde teilweise ausgeführt. Das Archiv ist entweder leer oder nicht vorhanden.",
|
||||
"BackDevices_DBTools_DelDev_a":"Gerät erfolgreich gelöscht.",
|
||||
"BackDevices_DBTools_DelDev_b":"Geräte erfolgreich gelöscht.",
|
||||
"BackDevices_DBTools_DelEvents":"Events erfolgreich gelöscht.",
|
||||
"BackDevices_DBTools_DelEventsError":"Fehler beim Löschen der Ereignisse.",
|
||||
"BackDevices_DBTools_DelDevError_a":"Fehler beim Löschen des Gerätes.",
|
||||
"BackDevices_DBTools_DelDevError_b":"Fehler beim Löschen der Geräte.",
|
||||
"BackDevices_DBTools_UpdDev":"Gerät erfolgreich aktualisiert.",
|
||||
"BackDevices_DBTools_UpdDevError":"Fehler beim Aktualisieren des Gerätes.",
|
||||
"BackDevices_DBTools_Upgrade":"Datenbank erfolgreich aktualisiert.",
|
||||
"BackDevices_DBTools_UpgradeError":"Fehler beim Aktualisieren der Datenbank.",
|
||||
"BackDevices_DBTools_Purge":"Die ältesten Backups wurden gelöscht.",
|
||||
"BackDevices_DBTools_DelActHistory":"Die Anzeige der Netzwerkaktivität wurde zurückgesetzt.",
|
||||
"BackDevices_DBTools_DelActHistoryError":"Fehler beim Zurücksetzen der Netzwerkaktivitätsanzeige.",
|
||||
"Network_Title":"Netzwerkübersicht",
|
||||
"Network_ManageDevices":"Geräte verwalten",
|
||||
"Network_ManageAdd":"Gerät hinzufügen",
|
||||
"Network_ManageEdit":"Gerät bearbeiten",
|
||||
"Network_ManageDel":"Gerät löschen",
|
||||
"Network_ManageAdd_Name":"Name des Gerätes",
|
||||
"Network_ManageAdd_Name_text":"Name ohne Sonderzeichen",
|
||||
"Network_ManageAdd_Type":"Gerätetyp",
|
||||
"Network_ManageAdd_Type_text":"-- Typ wählen --",
|
||||
"Network_ManageAdd_Port":"Portanzahl",
|
||||
"Network_ManageAdd_Port_text":"bei WLAN oder Powerline leer lassen",
|
||||
"Network_ManageAdd_Submit":"Hinzufügen",
|
||||
"Network_ManageEdit_ID":"Gerät zum Bearbeiten auswählen",
|
||||
"Network_ManageEdit_ID_text":"-- Gerät wählen --",
|
||||
"Network_ManageEdit_Name":"Neuer Name",
|
||||
"Network_ManageEdit_Name_text":"Name ohne Sonderzeichen",
|
||||
"Network_ManageEdit_Type":"Neuer Typ",
|
||||
"Network_ManageEdit_Type_text":"-- Typ wählen --",
|
||||
"Network_ManageEdit_Port":"Neue Portanzahl",
|
||||
"Network_ManageEdit_Port_text":"bei WLAN oder Powerline leer lassen",
|
||||
"Network_ManageEdit_Submit":"Speichern",
|
||||
"Network_ManageDel_Name":"Gerät zum Löschen auswählen",
|
||||
"Network_ManageDel_Name_text":"-- Gerät wählen --",
|
||||
"Network_ManageDel_Submit":"Löschen",
|
||||
"Network_Table_State":"Status",
|
||||
"Network_Table_Hostname":"Gerätename",
|
||||
"Network_Table_IP":"IP",
|
||||
"HelpFAQ_Title":"Hilfe / FAQ",
|
||||
"HelpFAQ_Cat_General":"Allgemein",
|
||||
"HelpFAQ_Cat_Detail":"Detailansicht",
|
||||
"HelpFAQ_Cat_General_100_head":"Die Uhr oben rechts und die Zeiten der Events/Anwesenheit stimmen nicht (Zeitverschiebung).",
|
||||
"HelpFAQ_Cat_General_100_text_a":"Auf deinem PC ist für die PHP Umgebung folgende Zeitzone voreingestellt:",
|
||||
"HelpFAQ_Cat_General_100_text_b":"Sollte dies nicht die Zeitzone sein, in der du dich aufhältst, solltest du die Zeitzone in der PHP Konfigurationsdatei anpassen. Diese findest du in diesem Verzeichnis:",
|
||||
"HelpFAQ_Cat_General_100_text_c":"Suche in dieser Datei nach dem Eintrag 'date.timezone', entferne ggf. das führende ';' und trage die gewünschte Zeitzone ein. Eine Liste mit den unterstützten Zeitzonen findest du hier (<a href=\"https://www.php.net/manual/de/timezones.php\" target=\"blank\">Link</a>).",
|
||||
"HelpFAQ_Cat_General_101_head":"Mein Netzwerk scheint langsamer zu werden, Streaming ruckelt.",
|
||||
"HelpFAQ_Cat_General_101_text":"Es kann durchaus sein, das leistungsschwache Geräte mit der Art und Weise, wie Pi.Alert neue Geräte im Netzwerk erkennt, an ihre Leistungsgrenzen kommen. Dies verstärkt sich noch einmal, <br/> wenn diese Geräte per WLAN mit dem Netzwerk kommunizieren. Lösungen wären hier, wenn möglich ein Wechsel auf eine Kabelverbindung oder, falls das Geräte nur einen begrenzten Zeitraum genutzt <br/> werden soll, den arp-Scan auf der Wartungsseite zu pausieren.",
|
||||
"HelpFAQ_Cat_General_102_head":"Ich bekomme die Meldung, dass die Datenbank schreibgeschützt (read only) ist.",
|
||||
"HelpFAQ_Cat_General_102_text":"Prüfe im Pi.Alert verzeichnis ob der Ordner der Datenbank (db) die richtigen Rechte zugewiesen bekommen hat:<br> <span class=\"text-danger help_faq_code\">drwxrwx--- 2 (dein Username) www-data</span><br> Sollte die Berechtigung nicht stimmen, kannst du sie mit folgenden Befehlen im Terminal oder der Konsole wieder setzen:<br> <span class=\"text-danger help_faq_code\"> sudo chgrp -R www-data ~/pialert/db<br> chmod -R 770 ~/pialert/db </span><br> Wenn die Datenbank danach noch immer schreibgeschützt ist, versuche eine erneute Installation, oder das Zuückspielen eines Datenbank-Backups über die Wartungsseite.",
|
||||
"HelpFAQ_Cat_General_102docker_head":"(🐳 Docker only) Database issues (AJAX errors, read-only, not found)",
|
||||
"HelpFAQ_Cat_General_102docker_text":"Double-check you have followed the <a href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles\">dockerfile readme (most up-to-date info)</a>. <br/> <br/> <ul data-sourcepos=\"49:4-52:146\" dir=\"auto\"> <li data-sourcepos=\"49:4-49:106\">Download the <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db\">original DB from GitHub</a>.</li> <li data-sourcepos=\"50:4-50:195\">Map the <code>pialert.db</code> file (<g-emoji class=\"g-emoji\" alias=\"warning\" fallback-src=\"https://github.githubassets.com/images/icons/emoji/unicode/26a0.png\">⚠</g-emoji> not folder) from above to <code>/home/pi/pialert/db/pialert.db</code> (see <a href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples\">Examples</a> for details).</li><li data-sourcepos=\"51:4-51:161\">If facing issues (AJAX errors, can not write to DB, etc,) make sure permissions are set correctly, alternatively check the logs under <code>/home/pi/pialert/front/log</code>.</li> <li data-sourcepos=\"52:4-52:146\">To solve permission issues you can also try to create a DB backup and then run a DB Restore via the <strong>Maintenance > Backup/Restore</strong> section.</li> <li data-sourcepos=\"53:4-53:228\">If the database is in read-only mode you can solve this by setting the owner and group by executing the following command on the host system: <code>docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db</code>.</li></ul>",
|
||||
"HelpFAQ_Cat_General_103_head":"Die Login-Seite erscheint nicht, auch nicht nach der Passwortänderung.",
|
||||
"HelpFAQ_Cat_General_103_text":"Neben dem Passwort, muss in der Konfigurationsdatei <span class=\"text-danger help_faq_code\">~/pialert/config/pialert.conf</span> auch der Parameter <span class=\"text-danger help_faq_code\">PIALERT_WEB_PROTECTION</span> auf <span class=\"text-danger help_faq_code\">True</span> gesetzt sein.",
|
||||
"HelpFAQ_Cat_Device_200_head":"Ich habe, mir nicht bekannte, Geräte in meiner Liste. Nach dem Löschen tauchen diese immer wieder auf.",
|
||||
"HelpFAQ_Cat_Device_200_text":"Wenn du Pi-hole verwendest, beachte bitte, dass Pi.Alert Informationen von Pi-hole abruft. Pausiere Pi.Alert, gehe in Pi-hole auf die Settings-Seite und lösche ggf. die betreffende DHCP-Lease. Anschließend schaue, ebenfalls in Pi-hole, unter Tools -> Network, ob sich dort die immer wiederkehrenden Hosts finden lassen. Wenn ja, lösche diese dort ebenfalls. Nun kannst du Pi.Alert wieder starten. Jetzt sollte das Gerät/die Geräte nicht mehr auftauchen.",
|
||||
"HelpFAQ_Cat_Detail_300_head":"Was bedeutet ",
|
||||
"HelpFAQ_Cat_Detail_300_text_a":"meint ein Netzwerkgerät (welches den typ AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router,USB LAN Adapter, USB WIFI Adapter, or Internet eingestellt hat)",
|
||||
"HelpFAQ_Cat_Detail_300_text_b":"bezeichnet die Anschlussnummer/Portnummer, an der das gerade bearbeitete Gerät mit diesem Netzwerkgerät verbunden ist.",
|
||||
"HelpFAQ_Cat_Detail_301_head_a":"Wann wird nun gescannt? Bei ",
|
||||
"HelpFAQ_Cat_Detail_301_head_b":" steht 1min aber der Graph zeigt 5min - Abstände an.",
|
||||
"HelpFAQ_Cat_Detail_301_text":"Den zeitlichen Abstand zwischen den Scans legt der \"Cronjob\" fest, welcher standardmäßig auf 5min eingestellt ist. Die Benennung \"1min\" bezieht sich auf die zu erwartende Dauer des Scans. Abhängig vor der Netzwerkkonfiguration kann diese Zeitangabe variieren. Um den Cronjob zu bearbeiten, kannst du im Terminal/der Konsole <span class=\"text-danger help_faq_code\">crontab -e</span> eingeben und den Intervall ändern.",
|
||||
"HelpFAQ_Cat_Detail_302_head_a":"Was bedeutet ",
|
||||
"HelpFAQ_Cat_Detail_302_head_b":" und warum kann ich das nicht auswählen?",
|
||||
"HelpFAQ_Cat_Detail_302_text":"Einige moderne Geräte generieren aus Datenschutzgründen zufällige MAC-Adressen, die keinem Hersteller mehr zugeordnet werden können und welche sich mit jeder neuen Verbindung wieder ändern. Pi.Alert erkennt, ob es sich um eine solche zufällige MAC-Adresse handelt und aktiviert diese \"Feld\" automatisch. Um das Verhalten abzustellen, muss du in deinem Endgerät schauen, wie du die MAC-Adressen-Generierung deaktivierst.",
|
||||
"HelpFAQ_Cat_Detail_303_head":"Was ist Nmap und wozu dient es?",
|
||||
"HelpFAQ_Cat_Detail_303_text":"Nmap ist ein Netzwerkscanner mit vielfältigen Möglichkeiten.<br> Wenn ein neues Gerät in deiner Liste auftaucht, hast du die Möglichkeit über den Nmap-Scan genauere Informationen über das Gerät zu erhalten.",
|
||||
"HelpFAQ_Cat_Presence_400_head":"Geräte werden mit einer gelben Markierung und dem Hinweis \"missing Event\" angezeigt.",
|
||||
"HelpFAQ_Cat_Presence_400_text":"Wenn dies geschieht hast du die Möglickeit, bei dem betreffenden Gerät (Detailsansicht) die Events zu löschen. Eine andere Möglichkeit wäre, das Gerät einzuschalten und zu warten, bis Pi.Alert mit dem nächsten Scan das Gerät als \"Online\" erkennt und anschließend das Gerät einfach wieder ausschalten. Nun sollte Pi.Alert mit dem nächsten Scan den Zustand des Gerätes ordentlich in der Datenbank vermerken.",
|
||||
"HelpFAQ_Cat_Presence_401_head":"Ein Gerät wird als Anwesend angezeigt, obwohl es \"Offline\" ist.",
|
||||
"HelpFAQ_Cat_Presence_401_text":"Wenn dies geschieht hast du die Möglickeit, bei dem betreffenden Gerät (Detailsansicht) die Events zu löschen. Eine andere Möglichkeit wäre, das Gerät einzuschalten und zu warten, bis Pi.Alert mit dem nächsten Scan das Gerät als \"Online\" erkennt und anschließend das Gerät einfach wieder ausschalten. Nun sollte Pi.Alert mit dem nächsten Scan den Zustand des Gerätes ordentlich in der Datenbank vermerken.",
|
||||
"HelpFAQ_Cat_Network_600_head":"Was bringt mir diese Seite?",
|
||||
"HelpFAQ_Cat_Network_600_text":"Diese Seite soll dir die Möglichkeit bieten, die Belegung deiner Netzwerkgeräte abzubilden. Dazu kannst du einen oder mehrere Switches, WLANs, Router, etc. erstellen, sie ggf. mit einer Portanzahl versehen und bereits erkannte Geräte diesen zuordnen. Diese Zuordnung erfolgt in der Detailansicht, des zuzuordnenden Gerätes. So ist es dir möglich, schnell festzustellen an welchem Port ein Host angeschlossen und ob er online ist.",
|
||||
"REPORT_TITLE":"Bericht",
|
||||
"REPORT_ERROR":"Die gesuchte Seite ist vorübergehend nicht verfügbar. Bitte versuchen Sie es nach ein paar Sekunden erneut",
|
||||
"SYSTEM_TITLE":"Systeminformationen",
|
||||
"Plugins_Out_of":"von",
|
||||
"Speedtest_Results":"Ergebnisse des Geschwindigkeitstests",
|
||||
"Systeminfo_General":"Allgemein",
|
||||
"Systeminfo_General_Full_Date":"Vollständiges Datum:",
|
||||
"Systeminfo_General_Date":"Datum:",
|
||||
"Systeminfo_General_Date2":"Datum2:",
|
||||
"Systeminfo_General_TimeZone":"Zeitzone:",
|
||||
"Systeminfo_This_Client":"Dieser Mandant",
|
||||
"Systeminfo_Client_User_Agent":"Benutzeragent:",
|
||||
"Systeminfo_Client_Resolution":"Browserauflösung:",
|
||||
"Systeminfo_CPU":"CPU",
|
||||
"Systeminfo_CPU_Vendor":"CPU-Anbieter:",
|
||||
"Systeminfo_CPU_Name":"CPU-Name:",
|
||||
"Systeminfo_CPU_Cores":"CPU-Kerne:",
|
||||
"Systeminfo_CPU_Speed":"CPU-Geschwindigkeit:",
|
||||
"Systeminfo_CPU_Temp":"CPU-Temp:",
|
||||
"Systeminfo_Memory":"Speicher",
|
||||
"Systeminfo_Memory_Usage":"Speichernutzung:",
|
||||
"Systeminfo_Memory_Usage_Percent":"Speicher %:",
|
||||
"Systeminfo_Memory_Total_Memory":"Gesamtspeicher:",
|
||||
"Systeminfo_Motherboard":"Hauptplatine",
|
||||
"Systeminfo_Motherboard_BIOS":"BIOS:",
|
||||
"Systeminfo_Motherboard_BIOS_Date":"BIOS-Datum:",
|
||||
"Systeminfo_Motherboard_BIOS_Vendor":"BIOS-Anbieter:",
|
||||
"Systeminfo_Motherboard_Manufactured":"Hergestellt von:",
|
||||
"Systeminfo_Motherboard_Name":"Name:",
|
||||
"Systeminfo_Motherboard_Revision":"Revision:",
|
||||
"Systeminfo_Storage":"Lagerung",
|
||||
"Systeminfo_Storage_Mount":"Mountpunkt:",
|
||||
"Systeminfo_Storage_Device":"Gerät:",
|
||||
"Systeminfo_Storage_Size":"Größe:",
|
||||
"Systeminfo_Storage_Type":"Typ:",
|
||||
"Systeminfo_Storage_Usage":"Speicherverwendung",
|
||||
"Systeminfo_Storage_Usage_Mount":"Mountpunkt:",
|
||||
"Systeminfo_Storage_Usage_Total":"Gesamt:",
|
||||
"Systeminfo_Storage_Usage_Used":"Verwendet:",
|
||||
"Systeminfo_Storage_Usage_Free":"Kostenlos:",
|
||||
"Systeminfo_Network":"Netzwerk",
|
||||
"Systeminfo_Network_Accept_Encoding":"Kodierung akzeptieren:",
|
||||
"Systeminfo_Network_Accept_Language":"Sprache akzeptieren:",
|
||||
"Systeminfo_Network_Connection_Port":"Verbindungsport:",
|
||||
"Systeminfo_Network_HTTP_Host":"HTTP-Host:",
|
||||
"Systeminfo_Network_HTTP_Referer":"HTTP-Referer:",
|
||||
"Systeminfo_Network_HTTP_Referer_String":"Kein HTTP-Referer",
|
||||
"Systeminfo_Network_IP":"IP Internet:",
|
||||
"Systeminfo_Network_IP_Connection":"IP-Verbindung:",
|
||||
"Systeminfo_Network_IP_Server":"Server-IP:",
|
||||
"Systeminfo_Network_MIME":"MIME:",
|
||||
"Systeminfo_Network_Request_Method":"Anfragemethode:",
|
||||
"Systeminfo_Network_Request_URI":"URI anfordern:",
|
||||
"Systeminfo_Network_Request_Time":"Anfragezeit:",
|
||||
"Systeminfo_Network_Secure_Connection":"Sichere Verbindung:",
|
||||
"Systeminfo_Network_Secure_Connection_String":"Nein (HTTP)",
|
||||
"Systeminfo_Network_Server_Name":"Servername:",
|
||||
"Systeminfo_Network_Server_Name_String":"Servername nicht gefunden",
|
||||
"Systeminfo_Network_Server_Query":"Serverabfrage:",
|
||||
"Systeminfo_Network_Server_Query_String":"Keine Abfragezeichenfolge",
|
||||
"Systeminfo_Network_Server_Version":"Serverversion:",
|
||||
"Systeminfo_Network_Hardware":"Netzwerk Hardware",
|
||||
"Systeminfo_Services":"Dienste",
|
||||
"Systeminfo_Services_Name":"Dienstname",
|
||||
"Systeminfo_Services_Description":"Dienstbeschreibung",
|
||||
"Systeminfo_System":"System",
|
||||
"Systeminfo_System_Architecture":"Architektur:",
|
||||
"Systeminfo_System_AVG":"AVG laden:",
|
||||
"Systeminfo_System_Kernel":"Kernel:",
|
||||
"Systeminfo_System_OSVersion":"Betriebssystem:",
|
||||
"Systeminfo_System_Running_Processes":"Laufende Prozesse:",
|
||||
"Systeminfo_System_System":"System:",
|
||||
"Systeminfo_System_Uname":"Uname:",
|
||||
"Systeminfo_System_Uptime":"Betriebszeit:",
|
||||
"Systeminfo_USB_Devices":"USB-Geräte"
|
||||
}
|
||||
}
|
||||
@@ -1,414 +0,0 @@
|
||||
<?php
|
||||
|
||||
$lang['de_de'] = array(
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// About - Update by @TeroRERO 07ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
'About_Title' => 'Open Source Network Guard',
|
||||
'About_Design' => 'Designed for:',
|
||||
'About_Exit' => 'Sign out',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// General
|
||||
//////////////////////////////////////////////////////////////////
|
||||
'Gen_Delete' => 'Löschen',
|
||||
'Gen_Cancel' => 'Abbrechen',
|
||||
'Gen_Okay' => 'Ok',
|
||||
'Gen_Purge' => 'Aufräumen',
|
||||
'Gen_Backup' => 'Sichern',
|
||||
'Gen_Restore' => 'Wiederherstellen',
|
||||
'Gen_Switch' => 'Umschalten',
|
||||
'Gen_AreYouSure' => 'Sind Sie sich sicher?',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Login Page - Update by @TeroRERO 03ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Login_Box' => 'Passwort eingeben',
|
||||
'Login_Remember' => 'Passwort speichern',
|
||||
'Login_Remember_small' => '(für 7 Tage gültig)',
|
||||
'Login_Submit' => 'Anmelden',
|
||||
'Login_Psw_run' => 'Um das Passwort zu ändern nutze:',
|
||||
'Login_Psw_new' => 'neues_passwort',
|
||||
'Login_Psw_folder' => 'im Ordner "~/pialert/config"',
|
||||
'Login_Psw_alert' => 'Sicherheitshinweis!',
|
||||
'Login_Psw-box' => 'Passwort',
|
||||
'Login_Toggle_Info' => 'Passwort Informationen',
|
||||
'Login_Toggle_Info_headline' => 'Passwort Information',
|
||||
'Login_Toggle_Alert_headline' => 'Passwort Warnung!',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Sidebar
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Navigation_Devices' => 'Geräte',
|
||||
'Navigation_Presence' => 'Anwesenheit',
|
||||
'Navigation_Events' => 'Ereignisse',
|
||||
'Navigation_Maintenance' => 'Wartung',
|
||||
'Navigation_Settings' => 'Einstellung',
|
||||
'Navigation_Network' => 'Netzwerk',
|
||||
'Navigation_HelpFAQ' => 'Hilfe / FAQ',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Device_Title' => 'Geräte',
|
||||
'Device_Shortcut_AllDevices' => 'Alle Geräte',
|
||||
'Device_Shortcut_Connected' => 'Verbunden',
|
||||
'Device_Shortcut_Favorites' => 'Favoriten',
|
||||
'Device_Shortcut_NewDevices' => 'Neue Geräte',
|
||||
'Device_Shortcut_DownAlerts' => 'Down Meldungen',
|
||||
'Device_Shortcut_Archived' => 'Archiviert',
|
||||
'Device_Shortcut_Devices' => 'Geräte',
|
||||
'Device_Shortcut_OnlineChart' => 'Gerätepräsenz im Laufe der Zeit',
|
||||
'Device_TableHead_Name' => 'Name',
|
||||
'Device_TableHead_Owner' => 'Eigentümer',
|
||||
'Device_TableHead_Type' => 'Typ',
|
||||
'Device_TableHead_Favorite' => 'Favorit',
|
||||
'Device_TableHead_Group' => 'Gruppe',
|
||||
'Device_TableHead_FirstSession' => 'Erste Sitzg.',
|
||||
'Device_TableHead_LastSession' => 'Letzte Sitzg.',
|
||||
'Device_TableHead_LastIP' => 'Letzte IP',
|
||||
'Device_TableHead_MAC' => 'MAC',
|
||||
'Device_TableHead_LastIPOrder' => 'Last IP Order',
|
||||
'Device_TableHead_Rowid' => 'Zeilennummer',
|
||||
'Device_TableHead_Status' => 'Status',
|
||||
'Device_Searchbox' => 'Suche',
|
||||
'Device_Tablelenght' => 'Zeige _MENU_ Einträge',
|
||||
'Device_Tablelenght_all' => 'Alle',
|
||||
'Device_Table_info' => 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen',
|
||||
'Device_Table_nav_next' => 'Nächste',
|
||||
'Device_Table_nav_prev' => 'Zurück',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Presence Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Presence_Title' => 'Anwesenheit pro Gerät',
|
||||
'Presence_Shortcut_AllDevices' => 'Alle Geräte',
|
||||
'Presence_Shortcut_Connected' => 'Verbunden',
|
||||
'Presence_Shortcut_Favorites' => 'Favoriten',
|
||||
'Presence_Shortcut_NewDevices' => 'Neue Geräte',
|
||||
'Presence_Shortcut_DownAlerts' => 'Down Meldungen',
|
||||
'Presence_Shortcut_Archived' => 'Archiviert',
|
||||
'Presence_Shortcut_Devices' => 'Geräte',
|
||||
|
||||
// Localizationfiles under pialert/front/lib/AdminLTE/bower_components/fullcalendar/dist/locale
|
||||
'Presence_CallHead_Devices' => 'Geräte',
|
||||
'Presence_CalHead_lang' => 'de',
|
||||
'Presence_CalHead_year' => 'Jahr',
|
||||
'Presence_CalHead_quarter' => 'Quartal',
|
||||
'Presence_CalHead_month' => 'Monat',
|
||||
'Presence_CalHead_week' => 'Woche',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Events Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Events_Title' => 'Ereignisse',
|
||||
'Events_Periodselect_today' => 'Heute',
|
||||
'Events_Periodselect_LastWeek' => 'Letzte Woche',
|
||||
'Events_Periodselect_LastMonth' => 'Letzter Monat',
|
||||
'Events_Periodselect_LastYear' => 'Letztes Jahr',
|
||||
'Events_Periodselect_All' => 'Alle Ereignisse',
|
||||
'Events_Shortcut_AllEvents' => 'Alle Ereignisse',
|
||||
'Events_Shortcut_Sessions' => 'Sitzungen',
|
||||
'Events_Shortcut_MissSessions' => 'fehlende Sitzungen',
|
||||
'Events_Shortcut_VoidSessions' => 'beendete Sitzungen',
|
||||
'Events_Shortcut_NewDevices' => 'Neue Geräte',
|
||||
'Events_Shortcut_DownAlerts' => 'Down Meldungen',
|
||||
'Events_Shortcut_Events' => 'Ereignisse',
|
||||
'Events_TableHead_Order' => 'Order',
|
||||
'Events_TableHead_Device' => 'Gerät',
|
||||
'Events_TableHead_Owner' => 'Eigentümer',
|
||||
'Events_TableHead_Date' => 'Datum',
|
||||
'Events_TableHead_EventType' => 'Ereignis Typ',
|
||||
'Events_TableHead_Connection' => 'Verbindung',
|
||||
'Events_TableHead_Disconnection' => 'Trennung',
|
||||
'Events_TableHead_Duration' => 'Dauer',
|
||||
'Events_TableHead_DurationOrder' => 'Duration Order',
|
||||
'Events_TableHead_IP' => 'IP',
|
||||
'Events_TableHead_IPOrder' => 'IP Order',
|
||||
'Events_TableHead_AdditionalInfo' => 'Zusätzliche Info',
|
||||
'Events_Searchbox' => 'Suche',
|
||||
'Events_Tablelenght' => 'Zeige _MENU_ Einträge',
|
||||
'Events_Tablelenght_all' => 'Alle',
|
||||
'Events_Table_info' => 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen',
|
||||
'Events_Table_nav_next' => 'Nächste',
|
||||
'Events_Table_nav_prev' => 'Zurück',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Details Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'DevDetail_Periodselect_today' => 'Heute',
|
||||
'DevDetail_Periodselect_LastWeek' => 'Letzte Woche',
|
||||
'DevDetail_Periodselect_LastMonth' => 'Letzter Monat',
|
||||
'DevDetail_Periodselect_LastYear' => 'Letztes Jahr',
|
||||
'DevDetail_Periodselect_All' => 'Alle Infos',
|
||||
'DevDetail_Shortcut_CurrentStatus' => 'aktueller Status',
|
||||
'DevDetail_Shortcut_Sessions' => 'Sitzungen',
|
||||
'DevDetail_Shortcut_Presence' => 'Anwesenheit',
|
||||
'DevDetail_Shortcut_DownAlerts' => 'Down Meldungen',
|
||||
'DevDetail_Tab_Details' => 'Details',
|
||||
'DevDetail_Tab_Nmap' => 'Nmap',
|
||||
'DevDetail_Tab_Sessions' => 'Sitzungen',
|
||||
'DevDetail_Tab_Presence' => 'Anwesenheit',
|
||||
'DevDetail_Tab_Events' => 'Ereignisse',
|
||||
'DevDetail_MainInfo_Title' => 'Haupt Infos',
|
||||
'DevDetail_MainInfo_mac' => 'MAC',
|
||||
'DevDetail_MainInfo_Name' => 'Name',
|
||||
'DevDetail_MainInfo_Owner' => 'Eigen-­tümer',
|
||||
'DevDetail_MainInfo_Type' => 'Typ',
|
||||
'DevDetail_MainInfo_Vendor' => 'Hersteller',
|
||||
'DevDetail_MainInfo_Favorite' => 'Favorit',
|
||||
'DevDetail_MainInfo_Group' => 'Gruppe',
|
||||
'DevDetail_MainInfo_Location' => 'Standort',
|
||||
'DevDetail_MainInfo_Comments' => 'Notiz',
|
||||
'DevDetail_MainInfo_Network' => 'Netzwerk Knoten',
|
||||
'DevDetail_MainInfo_Network_Port' => 'Netzwerk Knoten Port',
|
||||
'DevDetail_SessionInfo_Title' => 'Sitzungsinfos',
|
||||
'DevDetail_SessionInfo_Status' => 'Status',
|
||||
'DevDetail_SessionInfo_FirstSession' => 'Erste Sitzung',
|
||||
'DevDetail_SessionInfo_LastSession' => 'Letzte Sitzung',
|
||||
'DevDetail_SessionInfo_LastIP' => 'Letzte IP',
|
||||
'DevDetail_SessionInfo_StaticIP' => 'Statische IP',
|
||||
'DevDetail_EveandAl_Title' => 'Ereignisse & Alarme einstellen',
|
||||
'DevDetail_EveandAl_ScanCycle' => 'Scan Abstand',
|
||||
'DevDetail_EveandAl_AlertAllEvents' => 'Melde alle Ereignisse',
|
||||
'DevDetail_EveandAl_AlertDown' => 'Melde Down',
|
||||
'DevDetail_EveandAl_Skip' => 'pausiere wiederhol. Meldungen für',
|
||||
'DevDetail_EveandAl_NewDevice' => 'Neues Gerät',
|
||||
'DevDetail_EveandAl_Archived' => 'Archivierung',
|
||||
'DevDetail_EveandAl_RandomMAC' => 'Zufällige MAC',
|
||||
'DevDetail_EveandAl_ScanCycle_a' => 'Gerät scannen',
|
||||
'DevDetail_EveandAl_ScanCycle_z' => 'Gerät nicht scannen',
|
||||
'DevDetail_button_Delete' => 'Lösche Gerät',
|
||||
'DevDetail_button_Reset' => 'Verwerfen',
|
||||
'DevDetail_button_Save' => 'Speichern',
|
||||
'DevDetail_button_DeleteEvents' => 'Lösche Events',
|
||||
'DevDetail_button_DeleteEvents_Warning' => 'Sind Sie sicher, dass Sie alle Ereignisse dieses Geräts löschen möchten? (dies löscht den Ereignisverlauf und die Sitzungen und könnte bei ständigen (anhaltenden) Benachrichtigungen helfen)',
|
||||
'DevDetail_SessionTable_Order' => 'Order',
|
||||
'DevDetail_SessionTable_Connection' => 'Verbindung',
|
||||
'DevDetail_SessionTable_Disconnection' => 'Trennung',
|
||||
'DevDetail_SessionTable_Duration' => 'Dauer',
|
||||
'DevDetail_SessionTable_IP' => 'IP',
|
||||
'DevDetail_SessionTable_Additionalinfo' => 'Zusätzliche Info',
|
||||
'DevDetail_Events_CheckBox' => 'Blende Verbindungs-Ereignisse aus',
|
||||
'DevDetail_Nmap_buttonFast' => 'Schneller Scan',
|
||||
'DevDetail_Nmap_buttonDefault' => 'Standard Scan',
|
||||
'DevDetail_Nmap_buttonDetail' => 'Detailierter Scan',
|
||||
'DevDetail_Nmap_buttonFast_text' => 'Schneller Scan: Überprüft nur die wichtigsten 100 Ports (wenige Sekunden)',
|
||||
'DevDetail_Nmap_buttonDefault_text' => 'Standard Scan: Nmap scannt die ersten 1.000 Ports für jedes angeforderte Scan-Protokoll. Damit werden etwa 93 % der TCP-Ports und 49 % der UDP-Ports erfasst. (ca. 5-10 Sekunden)',
|
||||
'DevDetail_Nmap_buttonDetail_text' => 'Detailierter Scan: Standardscan mit aktivierter Betriebssystemerkennung, Versionserkennung, Skript-Scan und Traceroute (bis zu 30 oder mehr Sekunden)',
|
||||
'DevDetail_Nmap_buttonSkipDiscovery' => 'Ohne Erreichbarkeitsprüfung',
|
||||
'DevDetail_Nmap_buttonSkipDiscovery_text' => 'Ohne Erreichbarkeitsprüfung (-Pn Parameter): Standard Scan bei dem nmap annimmt, dass der Host erreichbar ist.',
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Maintenance_Title' => 'Wartungswerkzeuge',
|
||||
'Maintenance_database_path' => 'Datenbank-Pfad',
|
||||
'Maintenance_database_size' => 'Datenbank-Größe',
|
||||
'Maintenance_database_lastmod' => 'Letzte Änderung',
|
||||
'Maintenance_database_backup' => 'DB Sicherungen',
|
||||
'Maintenance_database_backup_found' => 'Sicherungen verfügbar',
|
||||
'Maintenance_database_backup_total' => 'Speicherplatz insgesamt',
|
||||
'Maintenance_arp_status' => 'Scan Status',
|
||||
'Maintenance_arp_status_off' => 'ist im Moment deaktiviert',
|
||||
'Maintenance_arp_status_on' => 'Scan(s) sind gerade aktiv',
|
||||
'Maintenance_themeselector_lable' => 'Skin Auswahl',
|
||||
'Maintenance_themeselector_empty' => 'Skin wählen',
|
||||
'Maintenance_themeselector_text' => 'Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.',
|
||||
'Maintenance_themeselector_apply' => 'Übernehmen',
|
||||
'Maintenance_lang_selector_lable' => 'Sprachauswahl',
|
||||
'Maintenance_lang_selector_empty' => 'Sprache wählen',
|
||||
'Maintenance_lang_en_us' => 'Englisch (US)',
|
||||
'Maintenance_lang_de_de' => 'Deutsch (DE)',
|
||||
'Maintenance_lang_es_es' => 'Spanisch (ES)',
|
||||
'Maintenance_lang_selector_text' => 'Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.',
|
||||
'Maintenance_lang_selector_apply' => 'Übernehmen',
|
||||
'Maintenance_Tools_Tab_Settings' => 'Einstellungen',
|
||||
'Maintenance_Tools_Tab_Tools' => 'Werkzeuge',
|
||||
'Maintenance_Tools_Tab_BackupRestore' => 'Sicherg. / Wiederherstellg.',
|
||||
'Maintenance_Tools_Tab_Logging' => 'Logs',
|
||||
'Maintenance_Tool_darkmode' => 'Darstellungswechsel (Dunkel/Hell)',
|
||||
'Maintenance_Tool_darkmode_text' => 'Wechselt zwischen der hellen und der dunklen Darstellung. Wenn der Wechsel nicht richtig funktionieren sollte, versuchen Sie den Browsercache zu löschen. Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.',
|
||||
'Maintenance_Tool_darkmode_noti' => 'Darstellungswechsel',
|
||||
'Maintenance_Tool_darkmode_noti_text' => 'Wechselt zwischen der hellen und der dunklen Darstellung. Wenn die Umschaltung nicht ordentlich funktionieren sollte, versuchen Sie den Browsercache zu löschen.',
|
||||
'Maintenance_Tool_arpscansw' => 'arp-Scan stoppen/starten',
|
||||
'Maintenance_Tool_arpscansw_text' => 'Schaltet den arp-Scan an oder aus. Wenn der Scan aus ist, bleibt er so lange aus bis er wieder aktiviert wird. Bereits laufende Scans werden dabei nicht beendet.',
|
||||
'Maintenance_Tool_arpscansw_noti' => 'arp-Scan stoppen/starten',
|
||||
'Maintenance_Tool_arpscansw_noti_text' => 'Wenn der Scan aus ist, bleibt er so lange aus bis er wieder aktiviert wird.',
|
||||
'Maintenance_Tool_del_empty_macs' => 'Alle Geräte ohne MAC löschen',
|
||||
'Maintenance_Tool_del_empty_macs_text' => 'Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Geäte ohne MAC-Adresse werden aus der Datenbank ge­löscht.',
|
||||
'Maintenance_Tool_del_empty_macs_noti' => 'Geräte löschen',
|
||||
'Maintenance_Tool_del_empty_macs_noti_text' => 'Sind Sie sicher, dass Sie alle Geräte ohne MAC-Adresse löschen wollen?<br>(Vielleicht bevorzugenn Sie eine Archivierung.)',
|
||||
'Maintenance_Tool_upgrade_database_noti' => 'Aktualisiere Datenbank',
|
||||
'Maintenance_Tool_upgrade_database_text' => 'Mit dieser Schaltfläche wird die Datenbank aktualisiert, um das Diagramm der Netzwerkaktivitäten der letzten 12 Stunden zu aktivieren. Bitte sichern Sie Ihre Datenbank, falls Probleme auftreten.',
|
||||
'Maintenance_Tool_upgrade_database_noti_text' => 'Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen.',
|
||||
'Maintenance_Tool_del_alldev' => 'Alle Geräte löschen',
|
||||
'Maintenance_Tool_del_alldev_text' => 'Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Geräte werden in der Datenbank ge­löscht.',
|
||||
'Maintenance_Tool_del_alldev_noti' => 'Geräte löschen',
|
||||
'Maintenance_Tool_del_alldev_noti_text' => 'Sind Sie sich sicher, dass Sie alle Geräte löschen wollen?',
|
||||
'Maintenance_Tool_del_unknowndev' => 'Löschen der (unknown) Geräte',
|
||||
'Maintenance_Tool_del_unknowndev_text' => 'Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Gräte mit dem Namen (unknown) werden aus der Datenbank ge­löscht.',
|
||||
'Maintenance_Tool_del_unknowndev_noti' => 'Lösche (unknown) Geräte',
|
||||
'Maintenance_Tool_del_unknowndev_noti_text' => 'Sind Sie sicher, dass Sie alle (unknown) Geräte aus der Datenbank löschen wollen?',
|
||||
'Maintenance_Tool_del_allevents' => 'Alle Ereignisse löschen',
|
||||
'Maintenance_Tool_del_allevents_text' => 'Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Der Vor­gang kann ohne Back­up nicht rück­gängig gemacht werden. Alle Ereignisse werden aus der Datenbank ge­löscht. Dies setzt auch die Anwesenheit zu­rück. Es kann ab dem Moment zu ungültigen Sitzungen kommen. Ein Scan, während das betreffende Gerät "online" ist, sollte das Problem lösen.',
|
||||
'Maintenance_Tool_del_allevents_noti' => 'Alle Ereignisse löschen',
|
||||
'Maintenance_Tool_del_allevents_noti_text' => 'Sind Sie sicher, dass Sie alle Ereignisse aus der Datenbank löschen wollen. Dies setzt die Anwesenheit aller Geräte zurück.',
|
||||
'Maintenance_Tool_backup' => 'DB Sicherung',
|
||||
'Maintenance_Tool_backup_text' => 'Die Datenbank-Sicher­ungen befinden sich im Datenbank-Ver­zeich­nis, gepackt als zip-Archive, benannt mit dem Erstellungs­datum. Es gibt keine maximale Anzahl von Backups.',
|
||||
'Maintenance_Tool_backup_noti' => 'DB Sicherung',
|
||||
'Maintenance_Tool_backup_noti_text' => 'Sind Sie sicher, dass Sie die Datenbank jetzt sichern möchten. Prüfen Sie, dass gerade keine Scans stattfinden.',
|
||||
'Maintenance_Tool_restore' => 'DB Wiederherstellung',
|
||||
'Maintenance_Tool_restore_text' => 'Das neuste Backup kann über diese Funk­tion wiederhergestellt werden. Ältere Sicher­ungen müssen manuell wieder­hergestellt wer­den. Es empfiehlt sich eine Integritäts­prüfung nach der Wieder­her­stellung zu machen, falls die Datenbank bei der Sicherung geöffnet war.',
|
||||
'Maintenance_Tool_restore_noti' => 'DB Wiederherstellung',
|
||||
'Maintenance_Tool_restore_noti_text' => 'Sind Sie sicher, dass Sie die Datenbank aus der neusten Sicherung wiederherstellen möchten? Prüfen Sie, dass gerade keine Scans stattfinden.',
|
||||
'Maintenance_Tool_purgebackup' => 'Sicherungen aufräumen',
|
||||
'Maintenance_Tool_purgebackup_text' => 'Es werden, bis auf die letzten 3 Backups, alle übrigen Backups gelöscht.',
|
||||
'Maintenance_Tool_purgebackup_noti' => 'Sicherungen aufräumen',
|
||||
'Maintenance_Tool_purgebackup_noti_text' => 'Sind Sie sicher, alle Backups, bis auf die letzten 3 löschen möchten?',
|
||||
'Maintenance_Tool_del_ActHistory' => 'Löschen der Netzwerkaktivität',
|
||||
'Maintenance_Tool_del_ActHistory_text' => 'Der Graph für die Netzwerkaktivität wird zurückgesetzt. Hierbei werden die Events nicht beeinflusst.',
|
||||
'Maintenance_Tool_del_ActHistory_noti' => 'Netzwerkaktivität löschen',
|
||||
'Maintenance_Tool_del_ActHistory_noti_text' => 'Sind Sie sicher, dass Sie die Netzwerkaktivität zurücksetzen möchten?',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'BackDevices_Arpscan_disabled' => 'Automatischer Arp-Scan deaktiviert.',
|
||||
'BackDevices_Arpscan_enabled' => 'Automatischer Arp-Scan aktiviert.',
|
||||
'BackDevices_darkmode_disabled' => 'Heller Modus aktiviert.',
|
||||
'BackDevices_darkmode_enabled' => 'Dunkler Modus aktiviert.',
|
||||
'BackDevices_Restore_CopError' => 'Die originale Datenbank konnte nicht kopiert werden.',
|
||||
'BackDevices_Restore_okay' => 'Die Wiederherstellung wurde erfolgreich ausgeführt.',
|
||||
'BackDevices_Restore_Failed' => 'Die Wiederherstellung ist fehlgeschlagen. Stellen Sie das Backup manuell her.',
|
||||
'BackDevices_Backup_CopError' => 'Die originale Datenbank konnte nicht gesichert werden.',
|
||||
'BackDevices_Backup_okay' => 'Das Backup wurde erfolgreich beendet.',
|
||||
'BackDevices_Backup_Failed' => 'Das Backup wurde teilweise ausgeführt. Das Archiv ist entweder leer oder nicht vorhanden.',
|
||||
'BackDevices_DBTools_DelDev_a' => 'Gerät erfolgreich gelöscht.',
|
||||
'BackDevices_DBTools_DelDev_b' => 'Geräte erfolgreich gelöscht.',
|
||||
'BackDevices_DBTools_DelEvents' => 'Events erfolgreich gelöscht.',
|
||||
'BackDevices_DBTools_DelEventsError' => 'Fehler beim Löschen der Ereignisse.',
|
||||
'BackDevices_DBTools_DelDevError_a' => 'Fehler beim Löschen des Gerätes.',
|
||||
'BackDevices_DBTools_DelDevError_b' => 'Fehler beim Löschen der Geräte.',
|
||||
'BackDevices_DBTools_UpdDev' => 'Gerät erfolgreich aktualisiert.',
|
||||
'BackDevices_DBTools_UpdDevError' => 'Fehler beim Aktualisieren des Gerätes.',
|
||||
'BackDevices_DBTools_Upgrade' => 'Datenbank erfolgreich aktualisiert.',
|
||||
'BackDevices_DBTools_UpgradeError' => 'Fehler beim Aktualisieren der Datenbank.',
|
||||
'BackDevices_DBTools_Purge' => 'Die ältesten Backups wurden gelöscht.',
|
||||
'BackDevices_DBTools_DelActHistory' => 'Die Anzeige der Netzwerkaktivität wurde zurückgesetzt.',
|
||||
'BackDevices_DBTools_DelActHistoryError' => 'Fehler beim Zurücksetzen der Netzwerkaktivitätsanzeige.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Network Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Network_Title' => 'Netzwerkübersicht',
|
||||
'Network_ManageDevices' => 'Geräte verwalten',
|
||||
'Network_ManageAdd' => 'Gerät hinzufügen',
|
||||
'Network_ManageEdit' => 'Gerät bearbeiten',
|
||||
'Network_ManageDel' => 'Gerät löschen',
|
||||
'Network_ManageAdd_Name' => 'Name des Gerätes',
|
||||
'Network_ManageAdd_Name_text' => 'Name ohne Sonderzeichen',
|
||||
'Network_ManageAdd_Type' => 'Gerätetyp',
|
||||
'Network_ManageAdd_Type_text' => '-- Typ wählen --',
|
||||
'Network_ManageAdd_Port' => 'Portanzahl',
|
||||
'Network_ManageAdd_Port_text' => 'bei WLAN oder Powerline leer lassen',
|
||||
'Network_ManageAdd_Submit' => 'Hinzufügen',
|
||||
'Network_ManageEdit_ID' => 'Gerät zum Bearbeiten auswählen',
|
||||
'Network_ManageEdit_ID_text' => '-- Gerät wählen --',
|
||||
'Network_ManageEdit_Name' => 'Neuer Name',
|
||||
'Network_ManageEdit_Name_text' => 'Name ohne Sonderzeichen',
|
||||
'Network_ManageEdit_Type' => 'Neuer Typ',
|
||||
'Network_ManageEdit_Type_text' => '-- Typ wählen --',
|
||||
'Network_ManageEdit_Port' => 'Neue Portanzahl',
|
||||
'Network_ManageEdit_Port_text' => 'bei WLAN oder Powerline leer lassen',
|
||||
'Network_ManageEdit_Submit' => 'Speichern',
|
||||
'Network_ManageDel_Name' => 'Gerät zum Löschen auswählen',
|
||||
'Network_ManageDel_Name_text' => '-- Gerät wählen --',
|
||||
'Network_ManageDel_Submit' => 'Löschen',
|
||||
'Network_Table_State' => 'Status',
|
||||
'Network_Table_Hostname' => 'Gerätename',
|
||||
'Network_Table_IP' => 'IP',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Help Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'HelpFAQ_Title' => 'Hilfe / FAQ',
|
||||
'HelpFAQ_Cat_General' => 'Allgemein',
|
||||
'HelpFAQ_Cat_Detail' => 'Detailansicht',
|
||||
'HelpFAQ_Cat_General_100_head' => 'Die Uhr oben rechts und die Zeiten der Events/Anwesenheit stimmen nicht (Zeitverschiebung).',
|
||||
'HelpFAQ_Cat_General_100_text_a' => 'Auf deinem PC ist für die PHP Umgebung folgende Zeitzone voreingestellt:',
|
||||
'HelpFAQ_Cat_General_100_text_b' => 'Sollte dies nicht die Zeitzone sein, in der du dich aufhältst, solltest du die Zeitzone in der PHP Konfigurationsdatei anpassen. Diese findest du in diesem Verzeichnis:',
|
||||
'HelpFAQ_Cat_General_100_text_c' => 'Suche in dieser Datei nach dem Eintrag "date.timezone", entferne ggf. das führende ";" und trage die gewünschte Zeitzone ein. Eine Liste mit den unterstützten Zeitzonen findest du hier (<a href="https://www.php.net/manual/de/timezones.php" target="blank">Link</a>).',
|
||||
'HelpFAQ_Cat_General_101_head' => 'Mein Netzwerk scheint langsamer zu werden, Streaming "ruckelt".',
|
||||
'HelpFAQ_Cat_General_101_text' => 'Es kann durchaus sein, das leistungsschwache Geräte mit der Art und Weise, wie Pi.Alert neue Geräte im Netzwerk erkennt, an ihre Leistungsgrenzen kommen. Dies verstärkt sich noch einmal,
|
||||
wenn diese Geräte per WLAN mit dem Netzwerk kommunizieren. Lösungen wären hier, wenn möglich ein Wechsel auf eine Kabelverbindung oder, falls das Geräte nur einen begrenzten Zeitraum genutzt
|
||||
werden soll, den arp-Scan auf der Wartungsseite zu pausieren.',
|
||||
'HelpFAQ_Cat_General_102_head' => 'Ich bekomme die Meldung, dass die Datenbank schreibgeschützt (read only) ist.',
|
||||
'HelpFAQ_Cat_General_102_text' => 'Prüfe im Pi.Alert verzeichnis ob der Ordner der Datenbank (db) die richtigen Rechte zugewiesen bekommen hat:<br>
|
||||
<span class="text-danger help_faq_code">drwxrwx--- 2 (dein Username) www-data</span><br>
|
||||
Sollte die Berechtigung nicht stimmen, kannst du sie mit folgenden Befehlen im Terminal oder der Konsole wieder setzen:<br>
|
||||
<span class="text-danger help_faq_code">
|
||||
sudo chgrp -R www-data ~/pialert/db<br>
|
||||
chmod -R 770 ~/pialert/db
|
||||
</span><br>
|
||||
Wenn die Datenbank danach noch immer schreibgeschützt ist, versuche eine erneute Installation, oder das Zuückspielen eines Datenbank-Backups über die Wartungsseite.',
|
||||
'HelpFAQ_Cat_General_102docker_head' => '(🐳 Docker only) Database issues (AJAX errors, read-only, not found)',
|
||||
'HelpFAQ_Cat_General_102docker_text' => 'Double-check you\'ve followed the <a href="https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles">dockerfile readme (most up-to-date info)</a>. <br/> <br/> <ul data-sourcepos="49:4-52:146" dir="auto">
|
||||
<li data-sourcepos="49:4-49:106">Download the <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db">original DB from GitHub</a>.</li>
|
||||
<li data-sourcepos="50:4-50:195">Map the <code>pialert.db</code> file (<g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠</g-emoji> not folder) from above to <code>/home/pi/pialert/db/pialert.db</code> (see <a href="https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples">Examples</a> for details).</li>
|
||||
<li data-sourcepos="51:4-51:161">If facing issues (AJAX errors, can\'t write to DB, etc,) make sure permissions are set correctly, alternatively check the logs under <code>/home/pi/pialert/front/log</code>.</li>
|
||||
<li data-sourcepos="52:4-52:146">To solve permission issues you can also try to create a DB backup and then run a DB Restore via the <strong>Maintenance > Backup/Restore</strong> section.</li>
|
||||
<li data-sourcepos="53:4-53:228">If the database is in read-only mode you can solve this by setting the owner and group by executing the following command on the host system: <code>docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db</code>.</li>
|
||||
</ul>',
|
||||
'HelpFAQ_Cat_General_103_head' => 'Die Login-Seite erscheint nicht, auch nicht nach der Passwortänderung.',
|
||||
'HelpFAQ_Cat_General_103_text' => 'Neben dem Passwort, muss in der Konfigurationsdatei <span class="text-danger help_faq_code">~/pialert/config/pialert.conf</span>
|
||||
auch der Parameter <span class="text-danger help_faq_code">PIALERT_WEB_PROTECTION</span> auf <span class="text-danger help_faq_code">True</span> gesetzt sein.',
|
||||
'HelpFAQ_Cat_Device_200_head' => 'Ich habe, mir nicht bekannte, Geräte in meiner Liste. Nach dem Löschen tauchen diese immer wieder auf.',
|
||||
'HelpFAQ_Cat_Device_200_text' => 'Wenn du Pi-hole verwendest, beachte bitte, dass Pi.Alert Informationen von Pi-hole abruft. Pausiere Pi.Alert, gehe in Pi-hole auf die Settings-Seite und
|
||||
lösche ggf. die betreffende DHCP-Lease. Anschließend schaue, ebenfalls in Pi-hole, unter Tools -> Network, ob sich dort die immer wiederkehrenden Hosts finden lassen.
|
||||
Wenn ja, lösche diese dort ebenfalls. Nun kannst du Pi.Alert wieder starten. Jetzt sollte das Gerät/die Geräte nicht mehr auftauchen.',
|
||||
'HelpFAQ_Cat_Detail_300_head' => 'Was bedeutet ',
|
||||
'HelpFAQ_Cat_Detail_300_text_a' => 'meint ein Netzwerkgerät (welches den typ AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router,USB LAN Adapter, USB WIFI Adapter, or Internet eingestellt hat)',
|
||||
'HelpFAQ_Cat_Detail_300_text_b' => 'bezeichnet die Anschlussnummer/Portnummer, an der das gerade bearbeitete Gerät mit diesem Netzwerkgerät verbunden ist.',
|
||||
'HelpFAQ_Cat_Detail_301_head_a' => 'Wann wird nun gescannt? Bei ',
|
||||
'HelpFAQ_Cat_Detail_301_head_b' => ' steht 1min aber der Graph zeigt 5min - Abstände an.',
|
||||
'HelpFAQ_Cat_Detail_301_text' => 'Den zeitlichen Abstand zwischen den Scans legt der "Cronjob" fest, welcher standardmäßig auf 5min eingestellt ist. Die Benennung "1min" bezieht sich auf die zu erwartende Dauer des Scans.
|
||||
Abhängig vor der Netzwerkkonfiguration kann diese Zeitangabe variieren. Um den Cronjob zu bearbeiten, kannst du im Terminal/der Konsole <span class="text-danger help_faq_code">crontab -e</span>
|
||||
eingeben und den Intervall ändern.',
|
||||
'HelpFAQ_Cat_Detail_302_head_a' => 'Was bedeutet ',
|
||||
'HelpFAQ_Cat_Detail_302_head_b' => ' und warum kann ich das nicht auswählen?',
|
||||
'HelpFAQ_Cat_Detail_302_text' => 'Einige moderne Geräte generieren aus Datenschutzgründen zufällige MAC-Adressen, die keinem Hersteller mehr zugeordnet werden können und welche sich mit jeder neuen Verbindung wieder ändern.
|
||||
Pi.Alert erkennt, ob es sich um eine solche zufällige MAC-Adresse handelt und aktiviert diese "Feld" automatisch. Um das Verhalten abzustellen, muss du in deinem Endgerät schauen, wie du die
|
||||
MAC-Adressen-Generierung deaktivierst.',
|
||||
'HelpFAQ_Cat_Detail_303_head' => 'Was ist Nmap und wozu dient es?',
|
||||
'HelpFAQ_Cat_Detail_303_text' => 'Nmap ist ein Netzwerkscanner mit vielfältigen Möglichkeiten.<br>
|
||||
Wenn ein neues Gerät in deiner Liste auftaucht, hast du die Möglichkeit über den Nmap-Scan genauere Informationen über das Gerät zu erhalten.',
|
||||
'HelpFAQ_Cat_Presence_400_head' => 'Geräte werden mit einer gelben Markierung und dem Hinweis "missing Event" angezeigt.',
|
||||
'HelpFAQ_Cat_Presence_400_text' => 'Wenn dies geschieht hast du die Möglickeit, bei dem betreffenden Gerät (Detailsansicht) die Events zu löschen. Eine andere Möglichkeit wäre, das Gerät einzuschalten und zu warten, bis Pi.Alert mit dem nächsten
|
||||
Scan das Gerät als "Online" erkennt und anschließend das Gerät einfach wieder ausschalten. Nun sollte Pi.Alert mit dem nächsten Scan den Zustand des Gerätes ordentlich in der Datenbank vermerken.',
|
||||
'HelpFAQ_Cat_Presence_401_head' => 'Ein Gerät wird als Anwesend angezeigt, obwohl es "Offline" ist.',
|
||||
'HelpFAQ_Cat_Presence_401_text' => 'Wenn dies geschieht hast du die Möglickeit, bei dem betreffenden Gerät (Detailsansicht) die Events zu löschen. Eine andere Möglichkeit wäre, das Gerät einzuschalten und zu warten, bis Pi.Alert mit dem nächsten
|
||||
Scan das Gerät als "Online" erkennt und anschließend das Gerät einfach wieder ausschalten. Nun sollte Pi.Alert mit dem nächsten Scan den Zustand des Gerätes ordentlich in der Datenbank vermerken.',
|
||||
'HelpFAQ_Cat_Network_600_head' => 'Was bringt mir diese Seite?',
|
||||
'HelpFAQ_Cat_Network_600_text' => 'Diese Seite soll dir die Möglichkeit bieten, die Belegung deiner Netzwerkgeräte abzubilden. Dazu kannst du einen oder mehrere Switches, WLANs, Router, etc. erstellen,
|
||||
sie ggf. mit einer Portanzahl versehen und bereits erkannte Geräte diesen zuordnen. Diese Zuordnung erfolgt in der Detailansicht, des zuzuordnenden Gerätes. So ist es dir möglich, schnell festzustellen
|
||||
an welchem Port ein Host angeschlossen und ob er online ist.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Settings
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
);
|
||||
?>
|
||||
667
front/php/templates/language/en_us.json
Executable file
667
front/php/templates/language/en_us.json
Executable file
@@ -0,0 +1,667 @@
|
||||
{
|
||||
"en_us": {
|
||||
"About_Title": "Open Source Network Guard",
|
||||
"About_Design" : "Designed for:",
|
||||
"About_Exit" : "Sign out",
|
||||
"Gen_Delete" : "Delete",
|
||||
"Gen_DeleteAll" : "Delete all",
|
||||
"Gen_Cancel" : "Cancel",
|
||||
"Gen_Okay" : "Ok",
|
||||
"Gen_Save" : "Save",
|
||||
"Gen_Saved" : "Saved",
|
||||
"Gen_Run" : "Run",
|
||||
"Gen_Copy" : "Run",
|
||||
"Gen_Action" : "Action",
|
||||
"Gen_Purge" : "Purge",
|
||||
"Gen_Backup" : "Run Backup",
|
||||
"Gen_Restore" : "Run Restore",
|
||||
"Gen_Switch" : "Switch",
|
||||
"Gen_AreYouSure" : "Are you sure?",
|
||||
"Gen_Upd" : "Updated successfully",
|
||||
"Gen_Upd_Fail" : "Update failed",
|
||||
"Gen_ReadDocs" : "Read more in the docs.",
|
||||
"Gen_DataUpdatedUITakesTime" : "OK - It may take a while for the UI to update if a scan is runnig.",
|
||||
"Gen_LockedDB" : "ERROR - DB might be locked - Check F12 Dev tools -> Console or try later.",
|
||||
"Login_Box" : "Enter your password",
|
||||
"Login_Remember" : "Remember",
|
||||
"Login_Remember_small" : "(valid for 7 days)",
|
||||
"Login_Submit" : "Log in",
|
||||
"Login_Psw_run" : "To change the password run:",
|
||||
"Login_Psw_new" : "new_password",
|
||||
"Login_Psw_folder" : "in the config folder.",
|
||||
"Login_Psw_alert" : "Password Alert!",
|
||||
"Login_Psw-box" : "Password",
|
||||
"Login_Toggle_Info" : "Password Information",
|
||||
"Login_Toggle_Info_headline" : "Password Information",
|
||||
"Login_Toggle_Alert_headline" : "Password Alert!",
|
||||
"Login_Default_PWD" : "Default password \"123456\" is still active.",
|
||||
"Navigation_Devices" : "Devices",
|
||||
"Navigation_Presence" : "Presence",
|
||||
"Navigation_Events" : "Events",
|
||||
"Navigation_Report" : "Report",
|
||||
"Navigation_Network" : "Network",
|
||||
"Navigation_Plugins" : "Plugins",
|
||||
"Navigation_Maintenance" : "Maintenance",
|
||||
"Navigation_Settings" : "Settings",
|
||||
"Navigation_SystemInfo" : "System info",
|
||||
"Navigation_Flows" : "Flows",
|
||||
"Navigation_HelpFAQ" : "Help / FAQ",
|
||||
"Navigation_Donations" : "Donations",
|
||||
"Device_Title" : "Devices",
|
||||
"Device_Shortcut_AllDevices" : "All Devices",
|
||||
"Device_Shortcut_Connected" : "Connected",
|
||||
"Device_Shortcut_Favorites" : "Favorites",
|
||||
"Device_Shortcut_NewDevices" : "New Devices",
|
||||
"Device_Shortcut_DownAlerts" : "Down Alerts",
|
||||
"Device_Shortcut_Archived" : "Archived",
|
||||
"Device_Shortcut_Devices" : "Devices",
|
||||
"Device_Shortcut_OnlineChart" : "Device presence over time",
|
||||
"Device_TableHead_Name" : "Name",
|
||||
"Device_TableHead_Owner" : "Owner",
|
||||
"Device_TableHead_Type" : "Type",
|
||||
"Device_TableHead_Icon" : "Icon",
|
||||
"Device_TableHead_RowID" : "Row ID",
|
||||
"Device_TableHead_Rowid" : "Row ID",
|
||||
"Device_TableHead_Parent_MAC" : "Parent node MAC",
|
||||
"Device_TableHead_Connected_Devices" : "Connected Devices",
|
||||
"Device_TableHead_Location" : "Location",
|
||||
"Device_TableHead_Vendor" : "Vendor",
|
||||
"Device_TableHead_Port" : "Port",
|
||||
"Device_TableHead_Favorite" : "Favorite",
|
||||
"Device_TableHead_Group" : "Group",
|
||||
"Device_TableHead_FirstSession" : "First Session",
|
||||
"Device_TableHead_LastSession" : "Last Session",
|
||||
"Device_TableHead_LastIP" : "Last IP",
|
||||
"Device_TableHead_MAC" : "MAC",
|
||||
"Device_TableHead_MAC_full" : "Full MAC",
|
||||
"Device_TableHead_LastIPOrder" : "Last IP Order",
|
||||
"Device_TableHead_Status" : "Status",
|
||||
"Device_Searchbox" : "Search",
|
||||
"Device_Tablelenght" : "Show _MENU_ entries",
|
||||
"Device_Tablelenght_all" : "All",
|
||||
"Device_Table_info" : "Showing _START_ to _END_ of _TOTAL_ entries",
|
||||
"Device_Table_nav_next" : "Next",
|
||||
"Device_Table_nav_prev" : "Previous",
|
||||
"Presence_Title" : "Presence by Device",
|
||||
"Presence_Loading" : "Loading...",
|
||||
"Loading" : "Loading...",
|
||||
"Presence_Shortcut_AllDevices" : "All Devices",
|
||||
"Presence_Shortcut_Connected" : "Connected",
|
||||
"Presence_Shortcut_Favorites" : "Favorites",
|
||||
"Presence_Shortcut_NewDevices" : "New Devices",
|
||||
"Presence_Shortcut_DownAlerts" : "Down Alerts",
|
||||
"Presence_Shortcut_Archived" : "Archived",
|
||||
"Presence_Shortcut_Devices" : "Devices",
|
||||
"Presence_CallHead_Devices" : "Devices",
|
||||
"Presence_CalHead_lang" : "en-us",
|
||||
"Presence_CalHead_year" : "year",
|
||||
"Presence_CalHead_quarter" : "quarter",
|
||||
"Presence_CalHead_month" : "month",
|
||||
"Presence_CalHead_week" : "week",
|
||||
"Presence_CalHead_day" : "day",
|
||||
"Events_Title" : "Events",
|
||||
"Events_Loading" : "Loading...",
|
||||
"Events_Periodselect_today" : "Today",
|
||||
"Events_Periodselect_LastWeek" : "Last Week",
|
||||
"Events_Periodselect_LastMonth" : "Last Month",
|
||||
"Events_Periodselect_LastYear" : "Last Year",
|
||||
"Events_Periodselect_All" : "All Info",
|
||||
"Events_Shortcut_AllEvents" : "All Events",
|
||||
"Events_Shortcut_Sessions" : "Sessions",
|
||||
"Events_Shortcut_MissSessions" : "Missing Sessions",
|
||||
"Events_Shortcut_VoidSessions" : "Voided Sessions",
|
||||
"Events_Shortcut_NewDevices" : "New Devices",
|
||||
"Events_Shortcut_DownAlerts" : "Down Alerts",
|
||||
"Events_Shortcut_Events" : "Events",
|
||||
"Events_TableHead_Order" : "Order",
|
||||
"Events_TableHead_Device" : "Device",
|
||||
"Events_TableHead_Owner" : "Owner",
|
||||
"Events_TableHead_Date" : "Date",
|
||||
"Events_TableHead_EventType" : "Event Type",
|
||||
"Events_TableHead_Connection" : "Connection",
|
||||
"Events_TableHead_Disconnection" : "Disconnection",
|
||||
"Events_TableHead_Duration" : "Duration",
|
||||
"Events_TableHead_DurationOrder" : "Duration Order",
|
||||
"Events_TableHead_IP" : "IP",
|
||||
"Events_TableHead_IPOrder" : "IP Order",
|
||||
"Events_TableHead_AdditionalInfo" : "Additional Info",
|
||||
"Events_Searchbox" : "Search",
|
||||
"Events_Tablelenght" : "Show _MENU_ entries",
|
||||
"Events_Tablelenght_all" : "All",
|
||||
"Events_Table_info" : "Showing _START_ to _END_ of _TOTAL_ entries",
|
||||
"Events_Table_nav_next" : "Next",
|
||||
"Events_Table_nav_prev" : "Previous",
|
||||
"DevDetail_Loading" : "Loading...",
|
||||
"DevDetail_Periodselect_today" : "Today",
|
||||
"DevDetail_Periodselect_LastWeek" : "Last Week",
|
||||
"DevDetail_Periodselect_LastMonth" : "Last Month",
|
||||
"DevDetail_Periodselect_LastYear" : "Last Year",
|
||||
"DevDetail_Periodselect_All" : "All Info",
|
||||
"DevDetail_Shortcut_CurrentStatus" : "Current Status",
|
||||
"DevDetail_Shortcut_Sessions" : "Sessions",
|
||||
"DevDetail_Shortcut_Presence" : "Presence",
|
||||
"DevDetail_Shortcut_DownAlerts" : "Down Alerts",
|
||||
"DevDetail_Tab_Details" : "<i class=\"fa fa-info-circle\"></i> Details",
|
||||
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Tools",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Title": "Internet Info",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Description": "The Internet info tool displays information about the Internet connection, such as IP address, city, country, area code and time zone.",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Start": "Start Internet Info",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Error": "An error has occurred",
|
||||
"DevDetail_Tab_Tools_Nslookup_Title": "Nslookup",
|
||||
"DevDetail_Tab_Tools_Nslookup_Description": "Nslookup is a command-line tool used to query the Domain Name System (DNS). DNS is a system that translates domain names, such as www.google.com, into IP addresses , such as 172.217.0.142.",
|
||||
"DevDetail_Tab_Tools_Nslookup_Start": "Start Nslookup",
|
||||
"DevDetail_Tab_Tools_Nslookup_Error": "Error: IP address is not valid",
|
||||
"DevDetail_Tab_Tools_Speedtest_Title" : "Online Speedtest",
|
||||
"DevDetail_Tab_Tools_Speedtest_Description" : "The Speedtest tool measures the download speed, upload speed and latency of the internet connection.",
|
||||
"DevDetail_Tab_Tools_Speedtest_Start" : "Start Speedtest",
|
||||
"DevDetail_Tab_Tools_Traceroute_Title": "Traceroute",
|
||||
"DevDetail_Tab_Tools_Traceroute_Description": "Traceroute is a network diagnostic command used to trace the path that data packets take from one host to another.<br><br>The command uses the Internet Control Message Protocol (ICMP) to send packets to intermediate nodes on the route, each intermediate node responds with an ICMP time-out (TTL timed out) packet.<br><br>The output of the traceroute command displays the IP address of each intermediate node on the route.<br><br>The traceroute command can be used to diagnose network problems, such as delays, packet loss, and blocked routes.<br><br>It can also be used to identify the location of an intermediate node on a network.",
|
||||
"DevDetail_Tab_Tools_Traceroute_Start": "Start Traceroute",
|
||||
"DevDetail_Tab_Tools_Traceroute_Error": "Error: IP address is not valid",
|
||||
"DevDetail_Tab_Nmap" : "<i class=\"fa fa-ethernet\"></i> Nmap",
|
||||
"DevDetail_Tab_Sessions" : "<i class=\"fa fa-list-ol\"></i> Sessions",
|
||||
"DevDetail_Tab_Presence" : "<i class=\"fa fa-calendar\"></i> Presence",
|
||||
"DevDetail_Tab_Events" : "<i class=\"fa fa-bolt\"></i> Events",
|
||||
"DevDetail_Tab_EventsTableDate" : "Date",
|
||||
"DevDetail_Tab_EventsTableEvent" : "Event type",
|
||||
"DevDetail_Tab_EventsTableIP" : "IP",
|
||||
"DevDetail_Tab_EventsTableInfo" : "Additional info",
|
||||
"DevDetail_Tab_Plugins" : "<i class=\"fa fa-plug\"></i> Plugins",
|
||||
"DevDetail_Tab_NmapTableHeader" : "Scheduled scan results",
|
||||
"DevDetail_Tab_NmapTableText" : "Set up a schedule in <a href=\"/settings.php#NMAP_ACTIVE\">Settings</a>",
|
||||
"DevDetail_Tab_NmapEmpty" : "No ports detected with Nmap on this device.",
|
||||
"DevDetail_Tab_NmapTableIndex" : "Index",
|
||||
"DevDetail_Tab_NmapTableTime" : "Time",
|
||||
"DevDetail_Tab_NmapTablePort" : "Port",
|
||||
"DevDetail_Tab_NmapTableState" : "State",
|
||||
"DevDetail_Tab_NmapTableService" : "Service",
|
||||
"DevDetail_Tab_NmapTableExtra" : "Extra",
|
||||
"DevDetail_MainInfo_Title" : "<i class=\"fa fa-pencil\"></i> Main Info",
|
||||
"DevDetail_MainInfo_mac" : "MAC",
|
||||
"DevDetail_MainInfo_Name" : "Name",
|
||||
"DevDetail_MainInfo_Owner" : "Owner",
|
||||
"DevDetail_Owner_hover" : "Who owns this device. Free text field.",
|
||||
"DevDetail_MainInfo_Type" : "Type",
|
||||
"DevDetail_Type_hover" : "The Type of the device. If you select any of the pre-defined network devices (e.g.: AP, Firewall, Router, Switch...) they will show up in the Network tree configuration as possible parent network nodes.",
|
||||
"DevDetail_Icon" : "Icon",
|
||||
"DevDetail_Icon_Descr" : "Enter a font awesome icon name without the fa- prefix or with complete class, e.g.: fa fa-brands fa-apple.",
|
||||
"DevDetail_MainInfo_Vendor" : "Vendor",
|
||||
"DevDetail_Vendor_hover" : "Vendor should be auto-detected. You can overwrite or add your custom value.",
|
||||
"DevDetail_MainInfo_Favorite" : "Favorite",
|
||||
"DevDetail_MainInfo_Group" : "Group",
|
||||
"DevDetail_MainInfo_Location" : "Location",
|
||||
"DevDetail_MainInfo_Comments" : "Comments",
|
||||
"DevDetail_MainInfo_Network_Title" : "<i class=\"fa fa-network-wired\"></i> Network",
|
||||
"DevDetail_MainInfo_Network" : "<i class=\"fa fa-server\"></i> Node (MAC)",
|
||||
"DevDetail_Network_Node_hover" : "Select the parent network device the current device is connected to to populate the Network tree.",
|
||||
"DevDetail_GoToNetworkNode" : "Navigate to the Network page of the given node.",
|
||||
"DevDetail_MainInfo_Network_Port" : "<i class=\"fa fa-ethernet\"></i> Port",
|
||||
"DevDetail_Network_Port_hover" : "The port this device is connected to on the parent network device. If left empty a wifi icon is displayed in the Network tree.",
|
||||
"DevDetail_SessionInfo_Title" : "<i class=\"fa fa-calendar\"></i> Session Info",
|
||||
"DevDetail_SessionInfo_Status" : "Status",
|
||||
"DevDetail_SessionInfo_FirstSession" : "First Session",
|
||||
"DevDetail_SessionInfo_LastSession" : "Last Session",
|
||||
"DevDetail_SessionInfo_LastIP" : "Last IP",
|
||||
"DevDetail_SessionInfo_StaticIP" : "Static IP",
|
||||
"DevDetail_EveandAl_Title" : "<i class=\"fa fa-bolt\"></i> Events & Alerts config",
|
||||
"DevDetail_EveandAl_ScanCycle" : "Scan device",
|
||||
"DevDetail_EveandAl_AlertAllEvents" : "Alert All Events",
|
||||
"DevDetail_EveandAl_AlertDown" : "Alert Down",
|
||||
"DevDetail_EveandAl_Skip" : "Skip repeated notifications for",
|
||||
"DevDetail_EveandAl_NewDevice" : "New Device",
|
||||
"DevDetail_EveandAl_Archived" : "Archived",
|
||||
"DevDetail_EveandAl_RandomMAC" : "Random MAC",
|
||||
"RandomMAC_hover" : "Autodetected - indicates if the device randomizes it's MAC address.",
|
||||
"DevDetail_EveandAl_ScanCycle_a" : "Scan Device",
|
||||
"DevDetail_EveandAl_ScanCycle_z" : "Don't Scan Device",
|
||||
"DevDetail_button_Delete" : "Delete Device",
|
||||
"DevDetail_button_DeleteEvents" : "Delete Events",
|
||||
"DevDetail_button_DeleteEvents_Warning" : "Are you sure you want to delete all Events of this device?<br><br>(this will clear the <b>Events history</b> and the <b>Sessions</b> and might help with constant (persistent) notifications)",
|
||||
"DevDetail_button_Reset" : "Reset Changes",
|
||||
"DevDetail_button_Save" : "Save",
|
||||
"DevDetail_button_OverwriteIcons" : "Overwrite Icons",
|
||||
"DevDetail_button_OverwriteIcons_Tooltip" : "Overwrite icons of all devices with the same device type",
|
||||
"DevDetail_button_OverwriteIcons_Warning" : "Are you sure you want to overwrite all icons of all devices with the same device type as the current device type?",
|
||||
"DevDetail_SessionTable_Order" : "Order",
|
||||
"DevDetail_SessionTable_Connection" : "Connection",
|
||||
"DevDetail_SessionTable_Disconnection" : "Disconnection",
|
||||
"DevDetail_SessionTable_Duration" : "Duration",
|
||||
"DevDetail_SessionTable_IP" : "IP",
|
||||
"DevDetail_SessionTable_Additionalinfo" : "Additional info",
|
||||
"DevDetail_Events_CheckBox" : "Hide Connection Events",
|
||||
"DevDetail_Nmap_buttonFast" : "Fast Scan",
|
||||
"DevDetail_Nmap_buttonDefault" : "Default Scan",
|
||||
"DevDetail_Nmap_buttonDetail" : "Detailed Scan",
|
||||
"DevDetail_Nmap_buttonFast_text" : "Fast Scan: Scan fewer ports (100) than the default scan (a few seconds)",
|
||||
"DevDetail_Nmap_buttonDefault_text" : "Default Scan: Nmap scans the top 1,000 ports for each scan protocol requested. This catches roughly 93% of the TCP ports and 49% of the UDP ports. (about 5 seconds)",
|
||||
"DevDetail_Nmap_buttonDetail_text" : "Detailed Scan: Default scan with enabled OS detection, version detection, script scanning and traceroute (up to 30 seconds or more)",
|
||||
"DevDetail_Nmap_buttonSkipDiscovery" : "Skip host discovery",
|
||||
"DevDetail_Nmap_buttonSkipDiscovery_text" : "Skip host discovery (-Pn option): Default scan without host discovery",
|
||||
"DevDetail_Nmap_resultsLink" : "You can leave this page after starting a scan. Results will be also available in the <code>pialert_front.log</code> file.",
|
||||
"DevDetail_Nmap_Scans": "Manual Nmap Scans",
|
||||
"DevDetail_Nmap_Scans_desc": "Here you can execute manual NMAP scans. You can also schedule regular automatic NMAP scans via the Services & Ports (NMAP) plugin. Head to <a href='/settings.php' target='_blank'>Settings</a> to find out more",
|
||||
"BackDevDetail_Actions_Title_Run" : "Run action",
|
||||
"BackDevDetail_Actions_Not_Registered" : "Action not registered: ",
|
||||
"BackDevDetail_Actions_Ask_Run" : "Do you want to execute the action?",
|
||||
"BackDevDetail_Tools_WOL_okay" : "The command was executed.",
|
||||
"BackDevDetail_Tools_WOL_error" : "The command was NOT executed.",
|
||||
"DevDetail_Tools_WOL_noti" : "Wake-on-LAN",
|
||||
"DevDetail_Tools_WOL_noti_text" : "The Wake-on-LAN command is sent to the broadcast address. If the target is not in the subnet/vlan of Pi.Alert, the target device will not respond.",
|
||||
"DevDetail_Tools_WOL" : "Send Wol command to ",
|
||||
"DevDetail_WOL_Title" : "<i class=\"fa fa-power-off\"></i> Wake-on-LAN",
|
||||
"DevDetail_Run_Actions_Title" : "<i class=\"fa fa-play\"></i> Run action on device",
|
||||
"DevDetail_Run_Actions_Tooltip" : "Run an action on the current device from the dropdown list.",
|
||||
"DevDetail_Copy_Device_Title" : "<i class=\"fa fa-copy\"></i> Copy details from device",
|
||||
"DevDetail_Copy_Device_Tooltip" : "Copy details from device from the dropdown list. Everything on this page will be overwritten",
|
||||
"BackDevDetail_Copy_Title" : "Copy details",
|
||||
"BackDevDetail_Copy_Ask" : "Copy details from device from the dropdown list (Everything on this page will be overwritten)?",
|
||||
"Maintenance_Title" : "Maintenance tools",
|
||||
"Maintenance_version" : "App updates",
|
||||
"Maintenance_new_version" : "🆕 A new version is available. Check out the <a href=\"https://github.com/jokob-sk/Pi.Alert/releases\" target=\"_blank\">release notes</a>.",
|
||||
"Maintenance_current_version" : "You are up-to-date. Check out what <a href=\"https://github.com/jokob-sk/Pi.Alert/issues/138\" target=\"_blank\">I am working on</a>.",
|
||||
"Maintenance_built_on" : "Built on",
|
||||
"Maintenance_Running_Version" : "Installed version",
|
||||
"Maintenance_database_path" : "Database-Path",
|
||||
"Maintenance_database_size" : "Database-Size",
|
||||
"Maintenance_database_rows" : "Table (Rows)",
|
||||
"Maintenance_database_lastmod" : "Last Modification",
|
||||
"Maintenance_database_backup" : "DB Backups",
|
||||
"Maintenance_database_backup_found" : "backups were found",
|
||||
"Maintenance_database_backup_total" : "total disk usage",
|
||||
"Maintenance_arp_status" : "Scan Status",
|
||||
"Maintenance_arp_status_off" : "is currently disabled",
|
||||
"Maintenance_arp_status_on" : "scan(s) currently running",
|
||||
"Maintenance_themeselector_lable" : "Select Skin",
|
||||
"Maintenance_themeselector_empty" : "Choose a Skin",
|
||||
"Maintenance_themeselector_apply" : "Apply",
|
||||
"Maintenance_themeselector_text" : "The change takes place on the server side, so it affects all devices in use.",
|
||||
"Maintenance_lang_selector_lable" : "Select Language",
|
||||
"Maintenance_lang_selector_empty" : "Choose Language",
|
||||
"Maintenance_lang_en_us" : "English (US)",
|
||||
"Maintenance_lang_de_de" : "German (DE)",
|
||||
"Maintenance_lang_es_es" : "Spanish (ES)",
|
||||
"Maintenance_lang_selector_text" : "The change takes place on the client side, so it affects only the current browser.",
|
||||
"Maintenance_lang_selector_apply" : "Apply",
|
||||
"Maintenance_Status" : "Status",
|
||||
"Maintenance_Tools_Tab_Settings" : "Settings",
|
||||
"Maintenance_Tools_Tab_UISettings" : "UI Settings",
|
||||
"Maintenance_Tools_Tab_Tools" : "Tools",
|
||||
"Maintenance_Tools_Tab_BackupRestore" : "Backup / Restore",
|
||||
"Maintenance_Tools_Tab_Logging" : "Logs",
|
||||
"Maintenance_Tool_displayed_columns_text" : "Change the visibility and order of the columns in the <a href=\"devices.php\"><b> <i class=\"fa fa-laptop\"></i> Devices</b></a> page. (The drag-and-drop is a bit clunky, but for now workable, not a common task - will not fix for now (tried for <a href=\"https://github.com/jokob-sk/Pi.Alert/commit/94b32f0f7332879f5a7d2af05dafa2e5d5cfa5da\">like 3h</a> - happy for someone to submit a PR :) )).",
|
||||
"Maintenance_Tool_order_columns_text" : "",
|
||||
"Maintenance_Tool_darkmode" : "Toggle Modes (Dark/Light)",
|
||||
"Maintenance_Tool_drag_me" : "Drag me to reorder columns.",
|
||||
"Maintenance_Tool_check_visible" : "Uncheck to hide column.",
|
||||
"Maintenance_Tool_darkmode_text" : "Toggle between dark mode and light mode. If the switch does not work properly, try to clear the browser cache. The change takes place on the server side, so it affects all devices in use.",
|
||||
"Maintenance_Tool_darkmode_noti" : "Toggle Modes",
|
||||
"Maintenance_Tool_darkmode_noti_text" : "After the theme switch, the page tries to reload itself to activate the change. If necessary, the cache must be cleared.",
|
||||
"Maintenance_Tool_arpscansw" : "Toggle arp-Scan (on/off)",
|
||||
"Maintenance_Tool_arpscansw_text" : "Switching the arp-scan on or off. When the scan has been switched off it remains off until it is activated again. Active scans are not canceled.",
|
||||
"Maintenance_Tool_arpscansw_noti" : "Toggle arp-Scan on or off",
|
||||
"Maintenance_Tool_arpscansw_noti_text" : "When the scan has been switched off it remains off until it is activated again.",
|
||||
"Maintenance_Tool_del_empty_macs" : "Delete Devices with empty MACs",
|
||||
"Maintenance_Tool_del_empty_macs_text" : "Before using this function, please make a backup. The deletion cannot be undone. All devices without MAC will be deleted from the database.",
|
||||
"Maintenance_Tool_del_empty_macs_noti" : "Delete Devices",
|
||||
"Maintenance_Tool_del_empty_macs_noti_text" : "Are you sure you want to delete all devices with empty MAC addresses?<br>(maybe you prefer to archive it)",
|
||||
"Maintenance_Tool_upgrade_database_noti" : "Upgrade database",
|
||||
"Maintenance_Tool_upgrade_database_text" : "This button will upgrade the database to enable the Network activity over last 12 hours chart. Please backup your database in case of issues.",
|
||||
"Maintenance_Tool_upgrade_database_noti_text" : "Are you sure you want to upgrade the database?<br>(maybe you prefer to archive it)",
|
||||
"Maintenance_Tool_del_alldev" : "Delete all Devices",
|
||||
"Maintenance_Tool_del_alldev_text" : "Before using this function, please make a backup. The deletion cannot be undone. All devices will be deleted from the database.",
|
||||
"Maintenance_Tool_del_alldev_noti" : "Delete Devices",
|
||||
"Maintenance_Tool_del_alldev_noti_text" : "Are you sure you want to delete all devices?",
|
||||
"Maintenance_Tool_del_unknowndev" : "Delete (unknown) Devices",
|
||||
"Maintenance_Tool_del_unknowndev_text" : "Before using this function, please make a backup. The deletion cannot be undone. All devices named (unknown) will be deleted from the database.",
|
||||
"Maintenance_Tool_del_unknowndev_noti" : "Delete (unknown) Devices",
|
||||
"Maintenance_Tool_del_unknowndev_noti_text" : "Are you sure you want to delete all (unknown) devices?",
|
||||
"Maintenance_Tool_del_allevents" : "Delete Events (Reset Presence)",
|
||||
"Maintenance_Tool_del_allevents_text" : "Before using this function, please make a backup. The deletion cannot be undone. All events in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as \"present\" although they are offline. A scan while the device in question is online solves the problem.",
|
||||
"Maintenance_Tool_del_allevents_noti" : "Delete Events",
|
||||
"Maintenance_Tool_del_allevents_noti_text" : "Are you sure you want to delete all Events? This resets Presence of all Devices.",
|
||||
"Maintenance_Tool_del_allevents30" : "Delete all Events older than 30 days",
|
||||
"Maintenance_Tool_del_allevents30_text" : "Before using this function, please make a backup. The deletion cannot be undone. All events older than 30 days in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as \"present\" although they are offline. A scan while the device in question is online solves the problem.",
|
||||
"Maintenance_Tool_del_allevents30_noti" : "Delete Events",
|
||||
"Maintenance_Tool_del_allevents30_noti_text" : "Are you sure you want to delete all Events older than 30 days? This resets Presence of all Devices.",
|
||||
"Maintenance_Tool_backup" : "DB Backup",
|
||||
"Maintenance_Tool_backup_text" : "The database backups are located in the database directory as a zip-archive, named with the creation date. There is no maximum number of backups.",
|
||||
"Maintenance_Tool_backup_noti" : "DB Backup",
|
||||
"Maintenance_Tool_backup_noti_text" : "Are you sure you want to execute the the DB Backup? Be sure that no scan is currently running.",
|
||||
"Maintenance_Tool_restore" : "DB Restore",
|
||||
"Maintenance_Tool_restore_text" : "The latest backup can be restored via the button, but older backups can only be restored manually. After the restore, make an integrity check on the database for safety, in case the db was currently in write access when the backup was created.",
|
||||
"Maintenance_Tool_restore_noti" : "DB Restore",
|
||||
"Maintenance_Tool_restore_noti_text" : "Are you sure you want to execute the the DB Restore? Be sure that no scan is currently running.",
|
||||
"Maintenance_Tool_purgebackup" : "Purge Backups",
|
||||
"Maintenance_Tool_purgebackup_text" : "All other backups will be deleted except for the last 3 backups.",
|
||||
"Maintenance_Tool_purgebackup_noti" : "Purge Backups",
|
||||
"Maintenance_Tool_purgebackup_noti_text" : "Are you sure you want to delete all backups except the last 3?",
|
||||
"Maintenance_Tool_del_ActHistory" : "Deleting the network activity",
|
||||
"Maintenance_Tool_del_ActHistory_text" : "The network activity graph is reset. This does not affect the events.",
|
||||
"Maintenance_Tool_del_ActHistory_noti" : "Delete network activity",
|
||||
"Maintenance_Tool_del_ActHistory_noti_text" : "Are you sure you want to reset the network activity?",
|
||||
"Maintenance_Tool_ExportCSV" : "CSV Export",
|
||||
"Maintenance_Tool_ExportCSV_text" : "Generate a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. You can also trigger this by acessing this URL <code>your pialert url/php/server/devices.php?action=ExportCSV</code>",
|
||||
"Maintenance_Tool_ExportCSV_noti" : "CSV Export",
|
||||
"Maintenance_Tool_ExportCSV_noti_text" : "Are you sure you want to generate a CSV file?",
|
||||
"Maintenance_Tool_ImportCSV" : "CSV Import",
|
||||
"Maintenance_Tool_ImportCSV_text" : "Before using this function, please make a backup. Import a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. To do that place the CSV file named <b>devices.csv</b> into your <b>/config</b> folder.",
|
||||
"Maintenance_Tool_ImportCSV_noti" : "CSV Import",
|
||||
"Maintenance_Tool_ImportCSV_noti_text" : "Are you sure you want to import the CSV file? This will completely overwrite the devices in your database.",
|
||||
"BackDevices_Arpscan_disabled" : "Arp-Scan Disabled",
|
||||
"BackDevices_Arpscan_enabled" : "Arp-Scan Enabled",
|
||||
"BackDevices_darkmode_disabled" : "Darkmode Disabled",
|
||||
"BackDevices_darkmode_enabled" : "Darkmode Enabled",
|
||||
"BackDevices_Restore_CopError" : "The original database could not be saved.",
|
||||
"BackDevices_Restore_okay" : "Restore executed successfully.",
|
||||
"BackDevices_Restore_Failed" : "Restore Failed. Please restore the backup manually.",
|
||||
"BackDevices_Backup_CopError" : "The original database could not be saved.",
|
||||
"BackDevices_Backup_okay" : "The backup executed successfully with the new archive",
|
||||
"BackDevices_Backup_Failed" : "The backup executed partially successfully. The archive could not be created or is empty.",
|
||||
"BackDevices_DBTools_DelDev_a" : "Device deleted successfully",
|
||||
"BackDevices_DBTools_DelDev_b" : "Devices deleted successfully",
|
||||
"BackDevices_DBTools_DelEvents" : "Events deleted successfully",
|
||||
"BackDevices_DBTools_DelEventsError" : "Error deleting Events",
|
||||
"BackDevices_DBTools_DelDevError_a" : "Error deleting Device",
|
||||
"BackDevices_DBTools_DelDevError_b" : "Error deleting Devices",
|
||||
"BackDevices_DBTools_UpdDev" : "Device updated successfully",
|
||||
"BackDevices_DBTools_UpdDevError" : "Error updating device",
|
||||
"BackDevices_DBTools_Upgrade" : "Database upgraded successfully",
|
||||
"BackDevices_DBTools_UpgradeError" : "Database upgrade failed",
|
||||
"BackDevices_DBTools_Purge" : "The oldest backups were deleted",
|
||||
"BackDevices_DBTools_ImportCSV" : "The devices from the CSV file were imported successfully.",
|
||||
"BackDevices_DBTools_ImportCSVError" : "The CSV file could not be imported. Make sure the format is correct.",
|
||||
"BackDevices_DBTools_ImportCSVMissing" : "The CSV file could not be found under <b>/config/devices.csv.</b>",
|
||||
"BackDevices_Device_UpdDevError" : "Error updating devices, try later. The database is probably locked due to an ongoing task.",
|
||||
"Network_Title" : "Network overview",
|
||||
"Network_ManageDevices" : "Manage Devices",
|
||||
"Network_ManageAdd" : "Add Device",
|
||||
"Network_ManageAssign" : "Assign",
|
||||
"Network_ManageUnassign" : "Unassign",
|
||||
"Network_ManageEdit" : "Update Device",
|
||||
"Network_ManageDel" : "Delete Device",
|
||||
"Network_ManageAdd_Name" : "Device Name",
|
||||
"Network_ManageAdd_Name_text" : "Name without special characters",
|
||||
"Network_ManageAdd_Type" : "Device Type",
|
||||
"Network_ManageAdd_Type_text" : "-- Select Type --",
|
||||
"Network_ManageAdd_Port" : "Port Count",
|
||||
"Network_ManageAdd_Port_text" : "leave blank for wifi and powerline",
|
||||
"Network_ManageAdd_Submit" : "Add Device",
|
||||
"Network_ManageEdit_ID" : "Device to update",
|
||||
"Network_ManageEdit_ID_text" : "-- Select Device for editing --",
|
||||
"Network_ManageEdit_Name" : "New Device Name",
|
||||
"Network_ManageEdit_Name_text" : "Name without special characters",
|
||||
"Network_ManageEdit_Type" : "New Device Type",
|
||||
"Network_ManageEdit_Type_text" : "-- Select Type --",
|
||||
"Network_ManageEdit_Port" : " New Port Count",
|
||||
"Network_ManageEdit_Port_text" : "leave blank for wifi and powerline",
|
||||
"Network_ManageEdit_Submit" : "Save Changes",
|
||||
"Network_ManageDel_Name" : "Device to delete",
|
||||
"Network_ManageDel_Name_text" : "-- Select Device --",
|
||||
"Network_ManageDel_Submit" : "Delete",
|
||||
"Network_Table_State" : "State",
|
||||
"Network_Table_Hostname" : "Hostname",
|
||||
"Network_Table_IP" : "IP",
|
||||
"Network_UnassignedDevices" : "Unassigned devices",
|
||||
"Network_Assign" : "Connect to the above <i class=\"fa fa-server\"></i> Network node",
|
||||
"Network_Connected" : "Connected devices",
|
||||
"Network_ManageLeaf" : "Manage assignment",
|
||||
"Network_Node" : "Network node",
|
||||
"Network_Node_Name" : "Node name",
|
||||
"Network_Parent" : "Parent network device",
|
||||
"Network_Cant_Assign" : "Can't assign the root Internet node as a child leaf node.",
|
||||
"Network_NoAssignedDevices" : "This network node does not have any assigned devices (leaf nodes). Assign one from bellow or go to the <b><i class=\"fa fa-info-circle\"></i> Details</b> tab of any device in <a href=\"devices.php\"><b> <i class=\"fa fa-laptop\"></i> Devices</b></a>, and assign it to a network <b><i class=\"fa fa-server\"></i> Node (MAC)</b> and <b><i class=\"fa fa-ethernet\"></i> Port</b> there.",
|
||||
"HelpFAQ_Title" : "Help / FAQ",
|
||||
"HelpFAQ_Cat_General" : "General",
|
||||
"HelpFAQ_Cat_Detail" : "Details",
|
||||
"HelpFAQ_Cat_General_100_head" : "The clock on the top right and the times of the events/presence are not correct (time difference).",
|
||||
"HelpFAQ_Cat_General_100_text_a" : "On your PC the following time zone is set for the PHP environment:",
|
||||
"HelpFAQ_Cat_General_100_text_b" : "If this is not the timezone you are in, you should change the timezone in the PHP configuration file. You can find it in this directory:",
|
||||
"HelpFAQ_Cat_General_100_text_c" : "Search in this file for the entry \"date.timezone\", remove the leading \";\" if necessary and enter the desired timezone. A list with the supported timezones can be found here (<a href=\"https://www.php.net/manual/en/timezones.php\" target=\"blank\">Link</a>)",
|
||||
"HelpFAQ_Cat_General_101_head" : "My network seems to slow down, streaming \"freezes\".",
|
||||
"HelpFAQ_Cat_General_101_text" : "It may well be that low-powered devices reach their performance limits with the way Pi.Alert detects new devices on the network. This is amplified even more, if these devices communicate with the network via WLAN. Solutions here would be to switch to a wired connection if possible or, if the device is only to be used for a limited period of time, to use the arp scan. pause the arp scan on the maintenance page.",
|
||||
"HelpFAQ_Cat_General_102_head" : "I get the message that the database is read only.",
|
||||
"HelpFAQ_Cat_General_102_text" : "Check in the Pi.Alert directory if the database folder (db) has been assigned the correct permissions:<br> <span class=\"text-danger help_faq_code\">drwxrwx--- 2 (your username) www-data</span><br> If the permission is not correct, you can set it again with the following commands in the terminal or the console:<br> <span class=\"text-danger help_faq_code\">sudo chgrp -R www-data ~/pialert/db<br>chmod -R 770 ~/pialert/db</span><br>If the database is still read-only, try reinstalling or restoring a database backup from the maintenance page.",
|
||||
"HelpFAQ_Cat_General_102docker_head" : "Database issues (AJAX errors, read-only, not found)",
|
||||
"HelpFAQ_Cat_General_102docker_text" : "Double-check you have followed the <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles\">dockerfile readme (most up-to-date info)</a>. <br/> <br/> <ul data-sourcepos=\"49:4-52:146\" dir=\"auto\"><li data-sourcepos=\"49:4-49:106\">Download the <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db\">original DB from GitHub</a>.</li><li data-sourcepos=\"50:4-50:195\">Map the <code>pialert.db</code> file (<g-emoji class=\"g-emoji\" alias=\"warning\" fallback-src=\"https://github.githubassets.com/images/icons/emoji/unicode/26a0.png\">⚠</g-emoji> not folder) from above to <code>/home/pi/pialert/db/pialert.db</code> (see <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples\">Examples</a> for details).</li><li data-sourcepos=\"51:4-51:161\">If facing issues (AJAX errors, can not write to DB, etc,) make sure permissions are set correctly, alternatively check the logs under <code>/home/pi/pialert/front/log</code>.</li><li data-sourcepos=\"52:4-52:146\">To solve permission issues you can also try to create a DB backup and then run a DB Restore via the <strong>Maintenance > Backup/Restore</strong> section.</li><li data-sourcepos=\"53:4-53:228\">If the database is in read-only mode you can solve this by setting the owner and group by executing the following command on the host system: <code>docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db</code>.</li></ul>",
|
||||
"HelpFAQ_Cat_General_103_head" : "The login page does not appear, even after changing the password.",
|
||||
"HelpFAQ_Cat_General_103_text" : "In addition to the password, the configuration file must contain <span class=\"text-danger help_faq_code\">~/pialert/config/pialert.conf</span> also the parameter <span class=\"text-danger help_faq_code\">PIALERT_WEB_PROTECTION</span> must set to <span class=\"text-danger help_faq_code\">True</span>.",
|
||||
"HelpFAQ_Cat_Device_200_head" : "I have devices in my list that I do not know about. After deleting them, they always reappear.",
|
||||
"HelpFAQ_Cat_Device_200_text" : "If you use Pi-hole, please note that Pi.Alert retrieves information from Pi-hole. Pause Pi.Alert, go to the settings page in Pi-hole and delete the DHCP lease if necessary. Then, also in Pi-hole, look under Tools -> Network to see if you can find the recurring hosts there. If yes, delete them there as well. Now you can start Pi.Alert again. Now the device(s) should not show up anymore.",
|
||||
"HelpFAQ_Cat_Detail_300_head" : "What means ",
|
||||
"HelpFAQ_Cat_Detail_300_text_a" : "means a network device (a device of the type AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router,USB LAN Adapter, USB WIFI Adapter, or Internet). Custom types can be added via the <code>NETWORK_DEVICE_TYPES</code> setting.",
|
||||
"HelpFAQ_Cat_Detail_300_text_b" : "designates the port number where the currently edited device is connected to this network device. Read <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md\">this guide</a> for more info.",
|
||||
"HelpFAQ_Cat_Detail_301_head_a" : "When is scanning now? At ",
|
||||
"HelpFAQ_Cat_Detail_301_head_b" : " says 1min but the graph shows 5min intervals.",
|
||||
"HelpFAQ_Cat_Detail_301_text" : "The time interval between the scans is defined by the \"Cronjob\", which is set to 5min by default. The designation \"1min\" refers to the expected duration of the scan. Depending on the network configuration, this time may vary. To edit the cronjob, you can use the following command in the terminal/console <span class=\"text-danger help_faq_code\">crontab -e</span>and change the interval.",
|
||||
"HelpFAQ_Cat_Detail_302_head_a" : "What means ",
|
||||
"HelpFAQ_Cat_Detail_302_head_b" : "and why can not I select that?",
|
||||
"HelpFAQ_Cat_Detail_302_text" : "Some modern devices generate random MAC addresses for privacy reasons, which can no longer be associated with any manufacturer and which change again with each new connection. Pi.Alert detects if it is such a random MAC address and activates this \"field\" automatically. To disable this behavior you have to look in your device how to disable MAC address randomization.",
|
||||
"HelpFAQ_Cat_Detail_303_head" : "What is Nmap and what is it for?",
|
||||
"HelpFAQ_Cat_Detail_303_text" : "Nmap is a network scanner with multiple capabilities.<br>When a new device appears in your list, you have the possibility to get more detailed information about the device via the Nmap scan.",
|
||||
"HelpFAQ_Cat_Presence_400_head" : "Devices are displayed with a yellow marker and the note \"missing event\".",
|
||||
"HelpFAQ_Cat_Presence_400_text" : "If this happens, you have the option to delete the events on the device in question (details view). Another possibility would be to switch on the device and wait until Pi.Alert detects the device as \"online\" with the next scan and then simply turn the device off again. Now Pi.Alert should properly note the state of the device in the database with the next scan.",
|
||||
"HelpFAQ_Cat_Presence_401_head" : "A device is displayed as present although it is \"Offline\".",
|
||||
"HelpFAQ_Cat_Presence_401_text" : "If this happens, you have the possibility to delete the events for the device in question (details view). Another possibility would be to switch on the device and wait until Pi.Alert recognizes the device as \"online\" with the next scan and then simply switch the device off again. Now Pi.Alert should properly note the state of the device in the database with the next scan.",
|
||||
"HelpFAQ_Cat_Network_600_head" : "What is this page for?",
|
||||
"HelpFAQ_Cat_Network_600_text" : "This page should offer you the possibility to map the assignment of your network devices. For this purpose, you can create one or more switches, WLANs, routers, etc., provide them with a port number if necessary and assign already detected devices to them. This assignment is done in the detailed view of the device to be assigned. So it is possible for you to quickly determine to which port a host is connected and if it is online. Read <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md\">this guide</a> for more info.",
|
||||
"HelpFAQ_Cat_Network_601_head" : "Are there other docs?",
|
||||
"HelpFAQ_Cat_Network_601_text" : "Yes, there are! Check <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/\">all docs</a> for more info.",
|
||||
"test_event_tooltip" : "Save your changes at first before you test your settings.",
|
||||
"test_event_icon" : "fa-vial-circle-check",
|
||||
"run_event_tooltip" : "Enable the setting and save your changes at first before you run it.",
|
||||
"run_event_icon" : "fa-play",
|
||||
"general_event_title" : "Executing an ad-hoc event",
|
||||
"general_event_description" : " The event you nove triggered might take a while until background processes finish. The execution ended once you see <code>finished</code> below. Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you didn not get the expected result. <br/> <br/> Status: ",
|
||||
"Plugins_Unprocessed_Events" : "Unprocessed Events",
|
||||
"Plugins_Objects" : "Plugin Objects",
|
||||
"Plugins_DeleteAll" : "Delete all (filters are ignored)",
|
||||
"Plugins_History" : "Events History",
|
||||
"Plugins_Filters_Mac" : "Mac Filter",
|
||||
"Plugins_Out_of" : "out of",
|
||||
"Plugins_no_control" : "No form control was found to render this value.",
|
||||
"Settings_Metadata_Toggle" : "Show/hide metadata for the given setting.",
|
||||
"settings_missing" : "Not all settings loaded, refresh the page! This is probably caused by a high load on the database or app startup sequence.",
|
||||
"settings_missing_block" : "You can not save your settings without specifying all setting keys. Refresh the page. This is probably caused by a high load on the database.",
|
||||
"settings_old" : "Importing settings and re-initializing...",
|
||||
"settings_saved" : "<br/>Settings saved to the <code>pialert.conf</code> file.<br/><br/>A time-stamped backup of the previous file created. <br/><br/> Reloading...<br/>",
|
||||
"settings_imported" : "Last time settings were imported from the pialert.conf file:",
|
||||
"settings_expand_all" : "Expand all",
|
||||
"Setting_Override" : "Override value",
|
||||
"Setting_Override_Description" : "Enabling this option will override an App supplied default value with the value specified above.",
|
||||
"General_display_name" : "General",
|
||||
"General_icon" : "<i class=\"fa fa-gears\"></i>",
|
||||
"SCAN_SUBNETS_description" : "Arp-scan is a command-line tool that uses the ARP protocol to discover and fingerprint IP hosts on the local network. An alternative to ARP scan is to enable the <a onclick=\"toggleAllSettings()\" href=\"#PIHOLE_RUN\"><code>PIHOLE_RUN</code>PiHole integration settings</a>. The arp-scan time itself depends on the number of IP addresses to check so set this up carefully with the appropriate network mask and interface. Check the <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md\" target=\"_blank\">subnets documentation</a> for help on setting up VLANs, what VLANs are supported, or how to figure out the network mask and your interface.",
|
||||
"LOG_LEVEL_name" : "Print additional logging",
|
||||
"LOG_LEVEL_description" : "This setting will enable more verbose logging. Useful for debugging events writing into the database.",
|
||||
"TIMEZONE_name" : "Time zone",
|
||||
"TIMEZONE_description" : "Time zone to display stats correctly. Find your time zone <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" rel=\"nofollow\">here</a>.",
|
||||
"ENABLE_PLUGINS_name" : "Enable Plugins",
|
||||
"ENABLE_PLUGINS_description" : "Enables the <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins\">plugins</a> functionality. Loading plugins requires more hardware resources so you might want to disable them on low-powered system.",
|
||||
"PLUGINS_KEEP_HIST_name" : "Plugins History",
|
||||
"PLUGINS_KEEP_HIST_description" : "How many entries of Plugins History scan results should be kept (per Plugin, not device specific).",
|
||||
"PIALERT_WEB_PROTECTION_name" : "Enable login",
|
||||
"PIALERT_WEB_PROTECTION_description" : "When enabled a login dialog is displayed. Read below carefully if you get locked out of your instance.",
|
||||
"PIALERT_WEB_PASSWORD_name" : "Login password",
|
||||
"PIALERT_WEB_PASSWORD_description" : "The default password is <code>123456</code>. To change the password run <code>/home/pi/pialert/back/pialert-cli</code> in the container or use the <a onclick=\"toggleAllSettings()\" href=\"#SETPWD_RUN\"><code>SETPWD_RUN</code> Set password plugin</a>.",
|
||||
"INCLUDED_SECTIONS_name" : "Notify on",
|
||||
"INCLUDED_SECTIONS_description" : "Specifies which events trigger notifications. Remove the event type(s) you do not want to get notified on. This setting overrides device-specific settings in the UI. (<code>CTRL + Click</code> to select/deselect).",
|
||||
"DAYS_TO_KEEP_EVENTS_name" : "Delete events older than",
|
||||
"DAYS_TO_KEEP_EVENTS_description" : "This is a maintenance setting. This specifies the number of days worth of event entries that will be kept. All older events will be deleted periodically. Also applies on Plugin Events History.",
|
||||
"HRS_TO_KEEP_NEWDEV_name" : "Keep new devices for",
|
||||
"HRS_TO_KEEP_NEWDEV_description" : "This is a maintenance setting. If enabled (<code>0</code> is disabled), devices marked as <b>New Device</b> will be deleted if their <b>First Session</b> time was older than the specified hours in this setting. Use this setting if you want to auto-delete <b>New Devices</b> after <code>X</code> hours.",
|
||||
"REPORT_DASHBOARD_URL_name" : "Pi.Alert URL",
|
||||
"REPORT_DASHBOARD_URL_description" : "This URL is used as the base for generating links in the emails. Enter full URL starting with <code>http://</code> including the port number (no trailig slash <code>/</code>).",
|
||||
"DIG_GET_IP_ARG_name" : "Internet IP discovery",
|
||||
"DIG_GET_IP_ARG_description" : "Change the <a href=\"https://linux.die.net/man/1/dig\" target=\"_blank\">dig utility</a> arguments if you have issues resolving your Internet IP. Arguments are added at the end of the following command: <code>dig +short </code>.",
|
||||
"NETWORK_DEVICE_TYPES_name" : "Network device types",
|
||||
"NETWORK_DEVICE_TYPES_description" : "Which device types are allowed to be used as network devices in the Network view. The device type has to match exactly the <code>Type</code> setting on a specific device in Device details. Do not remove existing types, only add new ones.",
|
||||
"UI_LANG_name" : "UI Language",
|
||||
"UI_LANG_description" : "Select the preferred UI language.",
|
||||
"UI_PRESENCE_name" : "Show in presence chart",
|
||||
"UI_PRESENCE_description" : "Select what statuses should be shown in the <b>Device presence over time</b> chart in the <a href=\"/devices.php\" target=\"_blank\">Devices</a> page. (<code>CTRL + Click</code> to select/deselect)",
|
||||
"Email_display_name" : "Email",
|
||||
"Email_icon" : "<i class=\"fa fa-at\"></i>",
|
||||
"REPORT_MAIL_name" : "Enable email",
|
||||
"REPORT_MAIL_description" : "If enabled an email is sent out with a list of changes you nove subscribed to. Please also fill out all remaining settings related to the SMTP setup below. If facing issues, set <code>LOG_LEVEL</code> to <code>debug</code> and check the <a href=\"/maintenance.php#tab_Logging\">error log</a>.",
|
||||
"SMTP_SERVER_name" : "SMTP server URL",
|
||||
"SMTP_SERVER_description" : "The SMTP server host URL. For example <code>smtp-relay.sendinblue.com</code>. To use Gmail as an SMTP server <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SMTP.md\">follow this guide</a>",
|
||||
"SMTP_PORT_name" : "SMTP server PORT",
|
||||
"SMTP_PORT_description" : "Port number used for the SMTP connection. Set to <code>0</code> if you do not want to use a port when connecting to the SMTP server.",
|
||||
"SMTP_SKIP_LOGIN_name" : "Skip authentication",
|
||||
"SMTP_SKIP_LOGIN_description" : "Do not use authentication when connecting to the SMTP server.",
|
||||
"SMTP_USER_name" : "SMTP user",
|
||||
"SMTP_USER_description" : "The user name used to login into the SMTP server (sometimes a full email address).",
|
||||
"SMTP_PASS_name" : "SMTP password",
|
||||
"SMTP_PASS_description" : "The SMTP server password. ",
|
||||
"SMTP_SKIP_TLS_name" : "Do not use TLS",
|
||||
"SMTP_SKIP_TLS_description" : "Disable TLS when connecting to your SMTP server.",
|
||||
"SMTP_FORCE_SSL_name" : "Force SSL",
|
||||
"SMTP_FORCE_SSL_description" : "Force SSL when connecting to your SMTP server.",
|
||||
"SYSTEM_TITLE" : "System Information",
|
||||
"REPORT_TO_name" : "Send email to",
|
||||
"REPORT_TO_description" : "Email address to which the notification will be send to.",
|
||||
"REPORT_FROM_name" : "Email subject",
|
||||
"REPORT_FROM_description" : "Notification email subject line. Some SMTP servers need this to be an email.",
|
||||
"Webhooks_display_name" : "Webhooks",
|
||||
"Webhooks_icon" : "<i class=\"fa fa-circle-nodes\"></i>",
|
||||
"REPORT_WEBHOOK_name" : "Enable Webhooks",
|
||||
"REPORT_WEBHOOK_description" : "Enable webhooks for notifications. Webhooks help you to connect to a lot of 3rd party tools, such as IFTTT, Zapier or <a href=\"https://n8n.io/\" target=\"_blank\">n8n</a> to name a few. Check out this simple <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md\" target=\"_blank\">n8n guide here</a> to get started. If enabled, configure related settings below.",
|
||||
"WEBHOOK_URL_name" : "Target URL",
|
||||
"WEBHOOK_URL_description" : "Target URL starting with <code>http://</code> or <code>https://</code>.",
|
||||
"WEBHOOK_PAYLOAD_name" : "Payload type",
|
||||
"WEBHOOK_PAYLOAD_description" : "The Webhook payload data format for the <code>body</code> > <code>attachments</code> > <code>text</code> attribute in the payload json. See an example of the payload <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json\">here</a>. (e.g.: for discord use <code>text</code>)",
|
||||
"WEBHOOK_REQUEST_METHOD_name" : "Request method",
|
||||
"WEBHOOK_REQUEST_METHOD_description" : "The HTTP request method to be used for the webhook call.",
|
||||
"WEBHOOK_SIZE_name" : "Max payload size",
|
||||
"WEBHOOK_SIZE_description" : "The maximum size of the webhook payload as number of characters in the passed string. If above limit, it will be truncated and a <code>(text was truncated)</code> message is appended.",
|
||||
"WEBHOOK_SECRET_name": "HMAC Secret",
|
||||
"WEBHOOK_SECRET_description": "When set, use this secret to generate the SHA256-HMAC hex digest value of the request body, which will be passed as the <code>X-Webhook-Signature</code> header to the request. You can find more informations <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_SECRET.md\">here</a>.",
|
||||
"Apprise_display_name" : "Apprise",
|
||||
"Apprise_icon" : "<i class=\"fa fa-bullhorn\"></i>",
|
||||
"REPORT_APPRISE_name" : "Enable Apprise",
|
||||
"REPORT_APPRISE_description" : "Enable sending notifications via <a target=\"_blank\" href=\"https://hub.docker.com/r/caronc/apprise\">Apprise</a>.",
|
||||
"APPRISE_HOST_name" : "Apprise host URL",
|
||||
"APPRISE_HOST_description" : "Apprise host URL starting with <code>http://</code> or <code>https://</code>. (do not forget to include <code>/notify</code> at the end)",
|
||||
"APPRISE_URL_name" : "Apprise notification URL",
|
||||
"APPRISE_URL_description" : "Apprise notification target URL. For example for Telegram it would be <code>tgram://{bot_token}/{chat_id}</code>.",
|
||||
"APPRISE_SIZE_name" : "Max payload size",
|
||||
"APPRISE_SIZE_description" : "The maximum size of the apprise payload as number of characters in the passed string. If above limit, it will be truncated and a <code>(text was truncated)</code> message is appended.",
|
||||
"NTFY_display_name" : "NTFY",
|
||||
"NTFY_icon" : "<i class=\"fa fa-terminal\"></i>",
|
||||
"REPORT_NTFY_name" : "Enable NTFY",
|
||||
"REPORT_NTFY_description" : "Enable sending notifications via <a target=\"_blank\" href=\"https://ntfy.sh/\">NTFY</a>.",
|
||||
"NTFY_HOST_name" : "NTFY host URL",
|
||||
"NTFY_HOST_description" : "NTFY host URL starting with <code>http://</code> or <code>https://</code>. You can use the hosted instance on <a target=\"_blank\" href=\"https://ntfy.sh/\">https://ntfy.sh</a> by simply entering <code>https://ntfy.sh</code>.",
|
||||
"NTFY_TOPIC_name" : "NTFY topic",
|
||||
"NTFY_TOPIC_description" : "Your secret topic.",
|
||||
"NTFY_USER_name" : "NTFY user",
|
||||
"NTFY_USER_description" : "Enter user if you need (host) an instance with enabled authetication.",
|
||||
"NTFY_PASSWORD_name" : "NTFY password",
|
||||
"NTFY_PASSWORD_description" : "Enter password if you need (host) an instance with enabled authetication.",
|
||||
"PUSHSAFER_display_name" : "Pushsafer",
|
||||
"PUSHSAFER_icon" : "<i class=\"fa fa-bell\"></i>",
|
||||
"REPORT_PUSHSAFER_name" : "Enable Pushsafer",
|
||||
"REPORT_PUSHSAFER_description" : "Enable sending notifications via <a target=\"_blank\" href=\"https://www.pushsafer.com/\">Pushsafer</a>.",
|
||||
"PUSHSAFER_TOKEN_name" : "Pushsafer token",
|
||||
"PUSHSAFER_TOKEN_description" : "Your secret Pushsafer API key (token).",
|
||||
"APPRISE_PAYLOAD_name" : "Payload type",
|
||||
"APPRISE_PAYLOAD_description" : "Select the payoad type sent to Apprise. For example <code>html</code> works well with emails, <code>text</code> with chat apps, such as Telegram.",
|
||||
"MQTT_display_name" : "MQTT",
|
||||
"MQTT_icon" : "<i class=\"fa fa-square-rss\"></i>",
|
||||
"REPORT_TITLE" : "Report",
|
||||
"REPORT_ERROR" : "The page you are looking for is temporarily unavailable, please try again after a few seconds",
|
||||
"REPORT_MQTT_name" : "Enable MQTT",
|
||||
"REPORT_MQTT_description" : "Enable sending notifications via <a target=\"_blank\" href=\"https://www.home-assistant.io/integrations/mqtt/\">MQTT</a> to your Home Assistance instance.",
|
||||
"MQTT_BROKER_name" : "MQTT broker URL",
|
||||
"MQTT_BROKER_description" : "MQTT host URL (do not include <code>http://</code> or <code>https://</code>).",
|
||||
"MQTT_PORT_name" : "MQTT broker port",
|
||||
"MQTT_PORT_description" : "Port number where the broker is listening. Usually <code>1883</code>.",
|
||||
"MQTT_USER_name" : "MQTT user",
|
||||
"MQTT_USER_description" : "User name used to login into your MQTT broker instance.",
|
||||
"MQTT_PASSWORD_name" : "MQTT password",
|
||||
"MQTT_PASSWORD_description" : "Password used to login into your MQTT broker instance.",
|
||||
"MQTT_QOS_name" : "MQTT Quality of Service",
|
||||
"MQTT_QOS_description" : "Quality of service setting for MQTT message sending. <code>0</code> - Low quality to <code>2</code> - High quality. The higher the quality the longer the delay.",
|
||||
"MQTT_DELAY_SEC_name" : "MQTT delay per device",
|
||||
"MQTT_DELAY_SEC_description" : "A little hack - delay adding to the queue in case the process is restarted and previous publish processes aborted (it takes ~<code>2</code>s to update a sensor config on the broker). Tested with <code>2</code>-<code>3</code> seconds of delay. This delay is only applied when devices are created (during the first notification loop). It doesn not affect subsequent scans or notifications.",
|
||||
"API_display_name" : "API",
|
||||
"API_icon" : "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
"API_CUSTOM_SQL_name" : "Custom endpoint",
|
||||
"API_CUSTOM_SQL_description" : "You can specify a custom SQL query which will generate a JSON file and then expose it via the <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code> file endpoint</a>.",
|
||||
"Speedtest_Results" : "Speedtest Results",
|
||||
"Systeminfo_General" : "General",
|
||||
"Systeminfo_General_Full_Date": "Full Date:",
|
||||
"Systeminfo_General_Date": "Date:",
|
||||
"Systeminfo_General_Date2": "Date2:",
|
||||
"Systeminfo_General_TimeZone": "Timezone:",
|
||||
"Systeminfo_This_Client" : "This Client",
|
||||
"Systeminfo_Client_User_Agent": "User Agent:",
|
||||
"Systeminfo_Client_Resolution": "Browser Resolution:",
|
||||
"Systeminfo_CPU" : "CPU",
|
||||
"Systeminfo_CPU_Vendor": "CPU Vendor:",
|
||||
"Systeminfo_CPU_Name": "CPU Name:",
|
||||
"Systeminfo_CPU_Cores": "CPU Cores:",
|
||||
"Systeminfo_CPU_Speed": "CPU Speed:",
|
||||
"Systeminfo_CPU_Temp": "CPU Temp:",
|
||||
"Systeminfo_Memory" : "Memory",
|
||||
"Systeminfo_Memory_Usage": "Memory usage:",
|
||||
"Systeminfo_Memory_Usage_Percent": "Memory %:",
|
||||
"Systeminfo_Memory_Total_Memory": "Total memory:",
|
||||
"Systeminfo_Motherboard" : "Motherboard",
|
||||
"Systeminfo_Motherboard_BIOS": "BIOS:",
|
||||
"Systeminfo_Motherboard_BIOS_Date": "BIOS date:",
|
||||
"Systeminfo_Motherboard_BIOS_Vendor": "BIOS vendor:",
|
||||
"Systeminfo_Motherboard_Manufactured": "Manufactured by:",
|
||||
"Systeminfo_Motherboard_Name": "Name:",
|
||||
"Systeminfo_Motherboard_Revision": "Revision:",
|
||||
"Systeminfo_Network" : "Network",
|
||||
"Systeminfo_Network_Accept_Encoding": "Accept encoding:",
|
||||
"Systeminfo_Network_Accept_Language": "Accept language:",
|
||||
"Systeminfo_Network_Connection_Port": "Connection port:",
|
||||
"Systeminfo_Network_HTTP_Host": "HTTP host:",
|
||||
"Systeminfo_Network_HTTP_Referer": "HTTP referer:",
|
||||
"Systeminfo_Network_HTTP_Referer_String": "No HTTP referer",
|
||||
"Systeminfo_Network_IP": "IP Internet:",
|
||||
"Systeminfo_Network_IP_Connection": "IP connection:",
|
||||
"Systeminfo_Network_IP_Server": "Server IP:",
|
||||
"Systeminfo_Network_MIME": "MIME:",
|
||||
"Systeminfo_Network_Request_Method": "Request Method:",
|
||||
"Systeminfo_Network_Request_URI": "Request URI:",
|
||||
"Systeminfo_Network_Request_Time": "Request time:",
|
||||
"Systeminfo_Network_Secure_Connection": "Secure connection:",
|
||||
"Systeminfo_Network_Secure_Connection_String": "No (HTTP)",
|
||||
"Systeminfo_Network_Server_Name": "Server name:",
|
||||
"Systeminfo_Network_Server_Name_String": "Server name not found",
|
||||
"Systeminfo_Network_Server_Query": "Server query:",
|
||||
"Systeminfo_Network_Server_Query_String": "No query string",
|
||||
"Systeminfo_Network_Server_Version": "Server Version:",
|
||||
"Systeminfo_Network_Hardware" : "Network Hardware",
|
||||
"Systeminfo_Storage" : "Storage",
|
||||
"Systeminfo_Storage_Mount" : "Mount point:",
|
||||
"Systeminfo_Storage_Device" : "Device:",
|
||||
"Systeminfo_Storage_Size" : "Size:",
|
||||
"Systeminfo_Storage_Type" : "Type:",
|
||||
"Systeminfo_Storage_Usage" : "Storage usage",
|
||||
"Systeminfo_Storage_Usage_Mount" : "Mount point:",
|
||||
"Systeminfo_Storage_Usage_Total" : "Total:",
|
||||
"Systeminfo_Storage_Usage_Used" : "Used:",
|
||||
"Systeminfo_Storage_Usage_Free" : "Free:",
|
||||
"Systeminfo_Services" : "Services",
|
||||
"Systeminfo_Services_Name" : "Service Name",
|
||||
"Systeminfo_Services_Description" : "Service Description",
|
||||
"Systeminfo_System" : "System",
|
||||
"Systeminfo_System_Architecture": "Architecture:",
|
||||
"Systeminfo_System_AVG": "Load average:",
|
||||
"Systeminfo_System_Kernel": "Kernel:",
|
||||
"Systeminfo_System_OSVersion": "Operating System:",
|
||||
"Systeminfo_System_Running_Processes" : "Running processes:",
|
||||
"Systeminfo_System_System": "System:",
|
||||
"Systeminfo_System_Uname": "Uname:",
|
||||
"Systeminfo_System_Uptime": "Uptime:",
|
||||
"Systeminfo_USB_Devices" : "USB Devices",
|
||||
"Donations_Title" : "Donations",
|
||||
"Donations_Text" : "Hey 👋! </br> Thanks for clicking on this menu item 😅 </br> </br> I'm trying to collect some donations to make you better software. Also, it would help me not to get burned out. Me burning out might mean end of support for this app. Any small (recurring or not) sponsorship makes me want ot put more effort into this app. I don't want to lock features (new plugins) behind paywalls 🔐. </br> Currently, I'm waking up 2h before work so I contribute to the app a bit. If I had some recurring income I could shorten my workweek and in the remaining time fully focus on PiAlert. You'd get more functionality, a more polished app and less bugs. </br> </br> Thanks for reading - I'm super grateful for any support ❤🙏 </br> </br> TL;DR: By supporting me you get: </br> </br> <ul><li>Regular updates to keep your data and family safe 🔄</li><li>Less bugs 🐛🔫</li><li>Better and more functionality➕</li><li>I don't get burned out 🔥🤯</li><li>Less rushed releases 💨</li><li>Better docs📚</li><li>Quicker and better support with issues 🆘</li><li>Less grumpy me 😄</li></ul> </br> 📧Email me to <a href='mailto:jokob@duck.com?subject=PiAlert'>jokob@duck.com</a> if you want to get in touch or if I should add other sponsorship platforms. </br>",
|
||||
"Donations_Platforms" : "Sponsor platforms",
|
||||
"Donations_Others" : "Others"
|
||||
}
|
||||
}
|
||||
@@ -1,722 +0,0 @@
|
||||
<?php
|
||||
|
||||
$lang['en_us'] = array(
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// About - Update by @TeroRERO 07ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
'About_Title' => 'Open Source Network Guard',
|
||||
'About_Design' => 'Designed for:',
|
||||
'About_Exit' => 'Sign out',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// General
|
||||
//////////////////////////////////////////////////////////////////
|
||||
'Gen_Delete' => 'Delete',
|
||||
'Gen_DeleteAll' => 'Delete all',
|
||||
'Gen_Cancel' => 'Cancel',
|
||||
'Gen_Okay' => 'Ok',
|
||||
'Gen_Save' => 'Save',
|
||||
'Gen_Saved' => 'Saved',
|
||||
'Gen_Run' => 'Run',
|
||||
'Gen_Copy' => 'Run',
|
||||
'Gen_Action' => 'Action',
|
||||
'Gen_Purge' => 'Purge',
|
||||
'Gen_Backup' => 'Run Backup',
|
||||
'Gen_Restore' => 'Run Restore',
|
||||
'Gen_Switch' => 'Switch',
|
||||
'Gen_AreYouSure' => 'Are you sure?',
|
||||
'Gen_Upd' => 'Updated successfully',
|
||||
'Gen_Upd_Fail' => 'Update failed',
|
||||
'Gen_ReadDocs' => 'Read more in the docs.',
|
||||
'Gen_DataUpdatedUITakesTime' => 'OK - It may take a while for the UI to update if a scan is runnig.',
|
||||
'Gen_LockedDB' => 'ERROR - DB might be locked - Check F12 Dev tools -> Console or try later.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Login Page - Update by @TeroRERO 03ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Login_Box' => 'Enter your password',
|
||||
'Login_Remember' => 'Remember',
|
||||
'Login_Remember_small' => '(valid for 7 days)',
|
||||
'Login_Submit' => 'Log in',
|
||||
'Login_Psw_run' => 'To change the password run:',
|
||||
'Login_Psw_new' => 'new_password',
|
||||
'Login_Psw_folder' => 'in the config folder.',
|
||||
'Login_Psw_alert' => 'Password Alert!',
|
||||
'Login_Psw-box' => 'Password',
|
||||
'Login_Toggle_Info' => 'Password Information',
|
||||
'Login_Toggle_Info_headline' => 'Password Information',
|
||||
'Login_Toggle_Alert_headline' => 'Password Alert!',
|
||||
'Login_Default_PWD' => 'Default password "123456" is still active.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Navigation_Devices' => 'Devices',
|
||||
'Navigation_Presence' => 'Presence',
|
||||
'Navigation_Events' => 'Events',
|
||||
'Navigation_Network' => 'Network',
|
||||
'Navigation_Plugins' => 'Plugins',
|
||||
'Navigation_Maintenance' => 'Maintenance',
|
||||
'Navigation_Settings' => 'Settings',
|
||||
'Navigation_HelpFAQ' => 'Help / FAQ',
|
||||
'Device_Title' => 'Devices',
|
||||
'Device_Shortcut_AllDevices' => 'All Devices',
|
||||
'Device_Shortcut_Connected' => 'Connected',
|
||||
'Device_Shortcut_Favorites' => 'Favorites',
|
||||
'Device_Shortcut_NewDevices' => 'New Devices',
|
||||
'Device_Shortcut_DownAlerts' => 'Down Alerts',
|
||||
'Device_Shortcut_Archived' => 'Archived',
|
||||
'Device_Shortcut_Devices' => 'Devices',
|
||||
'Device_Shortcut_OnlineChart' => 'Device presence over time',
|
||||
'Device_TableHead_Name' => 'Name',
|
||||
'Device_TableHead_Owner' => 'Owner',
|
||||
'Device_TableHead_Type' => 'Type',
|
||||
'Device_TableHead_Icon' => 'Icon',
|
||||
'Device_TableHead_RowID' => 'Row ID',
|
||||
'Device_TableHead_Rowid' => 'Row ID',
|
||||
'Device_TableHead_Parent_MAC' => 'Parent node MAC',
|
||||
'Device_TableHead_Connected_Devices' => 'Connected Devices',
|
||||
'Device_TableHead_Location' => 'Location',
|
||||
'Device_TableHead_Vendor' => 'Vendor',
|
||||
'Device_TableHead_Port' => 'Port',
|
||||
'Device_TableHead_Favorite' => 'Favorite',
|
||||
'Device_TableHead_Group' => 'Group',
|
||||
'Device_TableHead_FirstSession' => 'First Session',
|
||||
'Device_TableHead_LastSession' => 'Last Session',
|
||||
'Device_TableHead_LastIP' => 'Last IP',
|
||||
'Device_TableHead_MAC' => 'MAC',
|
||||
'Device_TableHead_MAC_full' => 'Full MAC',
|
||||
'Device_TableHead_LastIPOrder' => 'Last IP Order',
|
||||
'Device_TableHead_Status' => 'Status',
|
||||
'Device_Searchbox' => 'Search',
|
||||
'Device_Tablelenght' => 'Show _MENU_ entries',
|
||||
'Device_Tablelenght_all' => 'All',
|
||||
'Device_Table_info' => 'Showing _START_ to _END_ of _TOTAL_ entries',
|
||||
'Device_Table_nav_next' => 'Next',
|
||||
'Device_Table_nav_prev' => 'Previous',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Presence Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Presence_Title' => 'Presence by Device',
|
||||
'Presence_Shortcut_AllDevices' => 'All Devices',
|
||||
'Presence_Shortcut_Connected' => 'Connected',
|
||||
'Presence_Shortcut_Favorites' => 'Favorites',
|
||||
'Presence_Shortcut_NewDevices' => 'New Devices',
|
||||
'Presence_Shortcut_DownAlerts' => 'Down Alerts',
|
||||
'Presence_Shortcut_Archived' => 'Archived',
|
||||
'Presence_Shortcut_Devices' => 'Devices',
|
||||
|
||||
// Localizationfiles under pialert/front/lib/AdminLTE/bower_components/fullcalendar/dist/locale
|
||||
'Presence_CallHead_Devices' => 'Devices',
|
||||
'Presence_CalHead_lang' => 'en-us',
|
||||
'Presence_CalHead_year' => 'year',
|
||||
'Presence_CalHead_quarter' => 'quarter',
|
||||
'Presence_CalHead_month' => 'month',
|
||||
'Presence_CalHead_week' => 'week',
|
||||
'Presence_CalHead_day' => 'day',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Events Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Events_Title' => 'Events',
|
||||
'Events_Periodselect_today' => 'Today',
|
||||
'Events_Periodselect_LastWeek' => 'Last Week',
|
||||
'Events_Periodselect_LastMonth' => 'Last Month',
|
||||
'Events_Periodselect_LastYear' => 'Last Year',
|
||||
'Events_Periodselect_All' => 'All Info',
|
||||
'Events_Shortcut_AllEvents' => 'All Events',
|
||||
'Events_Shortcut_Sessions' => 'Sessions',
|
||||
'Events_Shortcut_MissSessions' => 'Missing Sessions',
|
||||
'Events_Shortcut_VoidSessions' => 'Voided Sessions',
|
||||
'Events_Shortcut_NewDevices' => 'New Devices',
|
||||
'Events_Shortcut_DownAlerts' => 'Down Alerts',
|
||||
'Events_Shortcut_Events' => 'Events',
|
||||
'Events_TableHead_Order' => 'Order',
|
||||
'Events_TableHead_Device' => 'Device',
|
||||
'Events_TableHead_Owner' => 'Owner',
|
||||
'Events_TableHead_Date' => 'Date',
|
||||
'Events_TableHead_EventType' => 'Event Type',
|
||||
'Events_TableHead_Connection' => 'Connection',
|
||||
'Events_TableHead_Disconnection' => 'Disconnection',
|
||||
'Events_TableHead_Duration' => 'Duration',
|
||||
'Events_TableHead_DurationOrder' => 'Duration Order',
|
||||
'Events_TableHead_IP' => 'IP',
|
||||
'Events_TableHead_IPOrder' => 'IP Order',
|
||||
'Events_TableHead_AdditionalInfo' => 'Additional Info',
|
||||
'Events_Searchbox' => 'Search',
|
||||
'Events_Tablelenght' => 'Show _MENU_ entries',
|
||||
'Events_Tablelenght_all' => 'All',
|
||||
'Events_Table_info' => 'Showing _START_ to _END_ of _TOTAL_ entries',
|
||||
'Events_Table_nav_next' => 'Next',
|
||||
'Events_Table_nav_prev' => 'Previous',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Details Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'DevDetail_Periodselect_today' => 'Today',
|
||||
'DevDetail_Periodselect_LastWeek' => 'Last Week',
|
||||
'DevDetail_Periodselect_LastMonth' => 'Last Month',
|
||||
'DevDetail_Periodselect_LastYear' => 'Last Year',
|
||||
'DevDetail_Periodselect_All' => 'All Info',
|
||||
'DevDetail_Shortcut_CurrentStatus' => 'Current Status',
|
||||
'DevDetail_Shortcut_Sessions' => 'Sessions',
|
||||
'DevDetail_Shortcut_Presence' => 'Presence',
|
||||
'DevDetail_Shortcut_DownAlerts' => 'Down Alerts',
|
||||
'DevDetail_Tab_Details' => '<i class="fa fa-info-circle"></i> Details',
|
||||
'DevDetail_Tab_Nmap' => '<i class="fa fa-ethernet"></i> Nmap',
|
||||
'DevDetail_Tab_Sessions' => '<i class="fa fa-list-ol"></i> Sessions',
|
||||
'DevDetail_Tab_Presence' => '<i class="fa fa-calendar"></i> Presence',
|
||||
'DevDetail_Tab_Events' => '<i class="fa fa-bolt"></i> Events',
|
||||
'DevDetail_Tab_Pholus' => '<i class="fa fa-search"></i> Pholus',
|
||||
'DevDetail_Tab_PholusEmpty' => 'Nothing sniffed out with Pholus for this device.',
|
||||
'DevDetail_Tab_Plugins' => '<i class="fa fa-plug"></i> Plugins',
|
||||
'DevDetail_Tab_NmapTableHeader' => 'Scheduled scan results',
|
||||
'DevDetail_Tab_NmapTableText' => 'Set up a schedule in <a href="/settings.php#NMAP_ACTIVE">Settings</a>',
|
||||
'DevDetail_Tab_NmapEmpty' => 'No ports detected with Nmap on this device.',
|
||||
'DevDetail_MainInfo_Title' => '<i class="fa fa-pencil"></i> Main Info',
|
||||
'DevDetail_MainInfo_mac' => 'MAC',
|
||||
'DevDetail_MainInfo_Name' => 'Name',
|
||||
'DevDetail_MainInfo_Owner' => 'Owner',
|
||||
'DevDetail_MainInfo_Type' => 'Type',
|
||||
'DevDetail_Icon' => 'Icon',
|
||||
'DevDetail_Icon_Descr' => 'Enter a font awesome icon name without the fa- prefix or with complete class, e.g.: fa fa-brands fa-apple.',
|
||||
'DevDetail_MainInfo_Vendor' => 'Vendor',
|
||||
'DevDetail_MainInfo_Favorite' => 'Favorite',
|
||||
'DevDetail_MainInfo_Group' => 'Group',
|
||||
'DevDetail_MainInfo_Location' => 'Location',
|
||||
'DevDetail_MainInfo_Comments' => 'Comments',
|
||||
'DevDetail_MainInfo_Network_Title' => '<i class="fa fa-network-wired"></i> Network',
|
||||
'DevDetail_MainInfo_Network' => '<i class="fa fa-server"></i> Node (MAC)',
|
||||
'DevDetail_GoToNetworkNode' => 'Navigate to the Network page of the given node.',
|
||||
'DevDetail_MainInfo_Network_Port' => '<i class="fa fa-ethernet"></i> Port',
|
||||
'DevDetail_SessionInfo_Title' => '<i class="fa fa-calendar"></i> Session Info',
|
||||
'DevDetail_SessionInfo_Status' => 'Status',
|
||||
'DevDetail_SessionInfo_FirstSession' => 'First Session',
|
||||
'DevDetail_SessionInfo_LastSession' => 'Last Session',
|
||||
'DevDetail_SessionInfo_LastIP' => 'Last IP',
|
||||
'DevDetail_SessionInfo_StaticIP' => 'Static IP',
|
||||
'DevDetail_EveandAl_Title' => '<i class="fa fa-bolt"></i> Events & Alerts config',
|
||||
'DevDetail_EveandAl_ScanCycle' => 'Scan device',
|
||||
'DevDetail_EveandAl_AlertAllEvents' => 'Alert All Events',
|
||||
'DevDetail_EveandAl_AlertDown' => 'Alert Down',
|
||||
'DevDetail_EveandAl_Skip' => 'Skip repeated notifications for',
|
||||
'DevDetail_EveandAl_NewDevice' => 'New Device',
|
||||
'DevDetail_EveandAl_Archived' => 'Archived',
|
||||
'DevDetail_EveandAl_RandomMAC' => 'Random MAC',
|
||||
'DevDetail_EveandAl_ScanCycle_a' => 'Scan Device',
|
||||
'DevDetail_EveandAl_ScanCycle_z' => 'Don't Scan Device',
|
||||
'DevDetail_button_Delete' => 'Delete Device',
|
||||
'DevDetail_button_DeleteEvents' => 'Delete Events',
|
||||
'DevDetail_button_DeleteEvents_Warning' => 'Are you sure you want to delete all Events of this device?<br><br>(this will clear the <b>Events history</b> and the <b>Sessions</b> and might help with constant (persistent) notifications)',
|
||||
'DevDetail_button_Reset' => 'Reset Changes',
|
||||
'DevDetail_button_Save' => 'Save',
|
||||
'DevDetail_button_OverwriteIcons' => 'Overwrite Icons',
|
||||
'DevDetail_button_OverwriteIcons_Tooltip' => 'Overwrite icons of all devices with the same device type',
|
||||
'DevDetail_button_OverwriteIcons_Warning' => 'Are you sure you want to overwrite all icons of all devices with the same device type as the current device type?',
|
||||
'DevDetail_SessionTable_Order' => 'Order',
|
||||
'DevDetail_SessionTable_Connection' => 'Connection',
|
||||
'DevDetail_SessionTable_Disconnection' => 'Disconnection',
|
||||
'DevDetail_SessionTable_Duration' => 'Duration',
|
||||
'DevDetail_SessionTable_IP' => 'IP',
|
||||
'DevDetail_SessionTable_Additionalinfo' => 'Additional info',
|
||||
'DevDetail_Events_CheckBox' => 'Hide Connection Events',
|
||||
'DevDetail_Nmap_buttonFast' => 'Fast Scan',
|
||||
'DevDetail_Nmap_buttonDefault' => 'Default Scan',
|
||||
'DevDetail_Nmap_buttonDetail' => 'Detailed Scan',
|
||||
'DevDetail_Nmap_buttonFast_text' => 'Fast Scan: Scan fewer ports (100) than the default scan (a few seconds)',
|
||||
'DevDetail_Nmap_buttonDefault_text' => 'Default Scan: Nmap scans the top 1,000 ports for each scan protocol requested. This catches roughly 93% of the TCP ports and 49% of the UDP ports. (about 5 seconds)',
|
||||
'DevDetail_Nmap_buttonDetail_text' => 'Detailed Scan: Default scan with enabled OS detection, version detection, script scanning and traceroute (up to 30 seconds or more)',
|
||||
'DevDetail_Nmap_buttonSkipDiscovery' => 'Skip host discovery',
|
||||
'DevDetail_Nmap_buttonSkipDiscovery_text' => 'Skip host discovery (-Pn option): Default scan without host discovery',
|
||||
'DevDetail_Nmap_resultsLink' => 'You can leave this page after starting a scan. Results will be also available in the <code>pialert_front.log</code> file.',
|
||||
'BackDevDetail_Actions_Title_Run' => 'Run action',
|
||||
'BackDevDetail_Actions_Not_Registered' => 'Action not registered: ',
|
||||
'BackDevDetail_Actions_Ask_Run' => 'Do you want to execute the action?',
|
||||
'BackDevDetail_Tools_WOL_okay' => 'The command was executed.',
|
||||
'BackDevDetail_Tools_WOL_error' => 'The command was NOT executed.',
|
||||
'DevDetail_Tools_WOL_noti' => 'Wake-on-LAN',
|
||||
'DevDetail_Tools_WOL_noti_text' => 'The Wake-on-LAN command is sent to the broadcast address. If the target is not in the subnet/vlan of Pi.Alert, the target device will not respond.',
|
||||
'DevDetail_Tools_WOL' => 'Send Wol command to ',
|
||||
'DevDetail_WOL_Title' => '<i class="fa fa-power-off"></i> Wake-on-LAN',
|
||||
'DevDetail_Run_Actions_Title' => '<i class="fa fa-play"></i> Run action on device',
|
||||
'DevDetail_Run_Actions_Tooltip' => 'Run an action on the current device from the dropdown list.',
|
||||
'DevDetail_Copy_Device_Title' => '<i class="fa fa-copy"></i> Copy details from device',
|
||||
'DevDetail_Copy_Device_Tooltip' => 'Copy details from device from the dropdown list. Everything on this page will be overwritten',
|
||||
'BackDevDetail_Copy_Title' => 'Copy details',
|
||||
'BackDevDetail_Copy_Ask' => 'Copy details from device from the dropdown list (Everything on this page will be overwritten)?',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Maintenance_Title' => 'Maintenance tools',
|
||||
'Maintenance_version' => 'App updates',
|
||||
'Maintenance_new_version' => '🆕 A new version is available. Check out the <a href="https://github.com/jokob-sk/Pi.Alert/releases" target="_blank">release notes</a>.',
|
||||
'Maintenance_current_version' => 'You are up-to-date. Check out what <a href="https://github.com/jokob-sk/Pi.Alert/issues/138" target="_blank">I\'m working on</a>.',
|
||||
'Maintenance_database_path' => 'Database-Path',
|
||||
'Maintenance_database_size' => 'Database-Size',
|
||||
'Maintenance_database_rows' => 'Table (Rows)',
|
||||
'Maintenance_database_lastmod' => 'Last Modification',
|
||||
'Maintenance_database_backup' => 'DB Backups',
|
||||
'Maintenance_database_backup_found' => 'backups were found',
|
||||
'Maintenance_database_backup_total' => 'total disk usage',
|
||||
'Maintenance_arp_status' => 'Scan Status',
|
||||
'Maintenance_arp_status_off' => 'is currently disabled',
|
||||
'Maintenance_arp_status_on' => 'scan(s) currently running',
|
||||
'Maintenance_themeselector_lable' => 'Select Skin',
|
||||
'Maintenance_themeselector_empty' => 'Choose a Skin',
|
||||
'Maintenance_themeselector_apply' => 'Apply',
|
||||
'Maintenance_themeselector_text' => 'The change takes place on the server side, so it affects all devices in use.',
|
||||
'Maintenance_lang_selector_lable' => 'Select Language',
|
||||
'Maintenance_lang_selector_empty' => 'Choose Language',
|
||||
'Maintenance_lang_en_us' => 'English (US)',
|
||||
'Maintenance_lang_de_de' => 'German (DE)',
|
||||
'Maintenance_lang_es_es' => 'Spanish (ES)',
|
||||
'Maintenance_lang_selector_text' => 'The change takes place on the client side, so it affects only the current browser.',
|
||||
'Maintenance_lang_selector_apply' => 'Apply',
|
||||
'Maintenance_Tools_Tab_Settings' => 'Settings',
|
||||
'Maintenance_Tools_Tab_UISettings' => 'UI Settings',
|
||||
'Maintenance_Tools_Tab_Tools' => 'Tools',
|
||||
'Maintenance_Tools_Tab_BackupRestore' => 'Backup / Restore',
|
||||
'Maintenance_Tools_Tab_Logging' => 'Logs',
|
||||
'Maintenance_Tool_displayed_columns_text' => 'Change the visibility and order of the columns in the <a href="devices.php"><b> <i class="fa fa-laptop"></i> Devices</b></a> page. (The drag-and-drop is a bit clunky, but for now workable, not a common task - won\'t fix for now (tried for <a href="https://github.com/jokob-sk/Pi.Alert/commit/94b32f0f7332879f5a7d2af05dafa2e5d5cfa5da">like 3h</a> - happy for someone to submit a PR :) )).',
|
||||
'Maintenance_Tool_order_columns_text' => '',
|
||||
'Maintenance_Tool_darkmode' => 'Toggle Modes (Dark/Light)',
|
||||
'Maintenance_Tool_drag_me' => 'Drag me to reorder columns.',
|
||||
'Maintenance_Tool_check_visible' => 'Uncheck to hide column.',
|
||||
'Maintenance_Tool_darkmode_text' => 'Toggle between dark mode and light mode. If the switch does not work properly, try to clear the browser cache. The change takes place on the server side, so it affects all devices in use.',
|
||||
'Maintenance_Tool_darkmode_noti' => 'Toggle Modes',
|
||||
'Maintenance_Tool_darkmode_noti_text' => 'After the theme switch, the page tries to reload itself to activate the change. If necessary, the cache must be cleared.',
|
||||
'Maintenance_Tool_arpscansw' => 'Toggle arp-Scan (on/off)',
|
||||
'Maintenance_Tool_arpscansw_text' => 'Switching the arp-scan on or off. When the scan has been switched off it remains off until it is activated again. Active scans are not canceled.',
|
||||
'Maintenance_Tool_arpscansw_noti' => 'Toggle arp-Scan on or off',
|
||||
'Maintenance_Tool_arpscansw_noti_text' => 'When the scan has been switched off it remains off until it is activated again.',
|
||||
'Maintenance_Tool_del_empty_macs' => 'Delete Devices with empty MACs',
|
||||
'Maintenance_Tool_del_empty_macs_text' => 'Before using this function, please make a backup. The deletion cannot be undone. All devices without MAC will be deleted from the database.',
|
||||
'Maintenance_Tool_del_empty_macs_noti' => 'Delete Devices',
|
||||
'Maintenance_Tool_del_empty_macs_noti_text' => 'Are you sure you want to delete all devices with empty MAC addresses?<br>(maybe you prefer to archive it)',
|
||||
'Maintenance_Tool_upgrade_database_noti' => 'Upgrade database',
|
||||
'Maintenance_Tool_upgrade_database_text' => 'This button will upgrade the database to enable the Network activity over last 12 hours chart. Please backup your database in case of issues.',
|
||||
'Maintenance_Tool_upgrade_database_noti_text' => 'Are you sure you want to upgrade the database?<br>(maybe you prefer to archive it)',
|
||||
'Maintenance_Tool_del_alldev' => 'Delete all Devices',
|
||||
'Maintenance_Tool_del_alldev_text' => 'Before using this function, please make a backup. The deletion cannot be undone. All devices will be deleted from the database.',
|
||||
'Maintenance_Tool_del_alldev_noti' => 'Delete Devices',
|
||||
'Maintenance_Tool_del_alldev_noti_text' => 'Are you sure you want to delete all devices?',
|
||||
'Maintenance_Tool_del_unknowndev' => 'Delete (unknown) Devices',
|
||||
'Maintenance_Tool_del_unknowndev_text' => 'Before using this function, please make a backup. The deletion cannot be undone. All devices named (unknown) will be deleted from the database.',
|
||||
'Maintenance_Tool_del_unknowndev_noti' => 'Delete (unknown) Devices',
|
||||
'Maintenance_Tool_del_unknowndev_noti_text' => 'Are you sure you want to delete all (unknown) devices?',
|
||||
'Maintenance_Tool_del_allevents' => 'Delete Events (Reset Presence)',
|
||||
'Maintenance_Tool_del_allevents_text' => 'Before using this function, please make a backup. The deletion cannot be undone. All events in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as "present" although they are offline. A scan while the device in question is online solves the problem.',
|
||||
'Maintenance_Tool_del_allevents_noti' => 'Delete Events',
|
||||
'Maintenance_Tool_del_allevents_noti_text' => 'Are you sure you want to delete all Events? This resets Presence of all Devices.',
|
||||
'Maintenance_Tool_del_allevents30' => 'Delete all Events older than 30 days',
|
||||
'Maintenance_Tool_del_allevents30_text' => 'Before using this function, please make a backup. The deletion cannot be undone. All events older than 30 days in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as "present" although they are offline. A scan while the device in question is online solves the problem.',
|
||||
'Maintenance_Tool_del_allevents30_noti' => 'Delete Events',
|
||||
'Maintenance_Tool_del_allevents30_noti_text' => 'Are you sure you want to delete all Events older than 30 days? This resets Presence of all Devices.',
|
||||
'Maintenance_Tool_backup' => 'DB Backup',
|
||||
'Maintenance_Tool_backup_text' => 'The database backups are located in the database directory as a zip-archive, named with the creation date. There is no maximum number of backups.',
|
||||
'Maintenance_Tool_backup_noti' => 'DB Backup',
|
||||
'Maintenance_Tool_backup_noti_text' => 'Are you sure you want to execute the the DB Backup? Be sure that no scan is currently running.',
|
||||
'Maintenance_Tool_restore' => 'DB Restore',
|
||||
'Maintenance_Tool_restore_text' => 'The latest backup can be restored via the button, but older backups can only be restored manually. After the restore, make an integrity check on the database for safety, in case the db was currently in write access when the backup was created.',
|
||||
'Maintenance_Tool_restore_noti' => 'DB Restore',
|
||||
'Maintenance_Tool_restore_noti_text' => 'Are you sure you want to execute the the DB Restore? Be sure that no scan is currently running.',
|
||||
'Maintenance_Tool_purgebackup' => 'Purge Backups',
|
||||
'Maintenance_Tool_purgebackup_text' => 'All other backups will be deleted except for the last 3 backups.',
|
||||
'Maintenance_Tool_purgebackup_noti' => 'Purge Backups',
|
||||
'Maintenance_Tool_purgebackup_noti_text' => 'Are you sure you want to delete all backups except the last 3?',
|
||||
'Maintenance_Tool_del_ActHistory' => 'Deleting the network activity',
|
||||
'Maintenance_Tool_del_ActHistory_text' => 'The network activity graph is reset. This does not affect the events.',
|
||||
'Maintenance_Tool_del_ActHistory_noti' => 'Delete network activity',
|
||||
'Maintenance_Tool_del_ActHistory_noti_text' => 'Are you sure you want to reset the network activity?',
|
||||
'Maintenance_Tool_ExportCSV' => 'CSV Export',
|
||||
'Maintenance_Tool_ExportCSV_text' => 'Generate a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices.',
|
||||
'Maintenance_Tool_ExportCSV_noti' => 'CSV Export',
|
||||
'Maintenance_Tool_ExportCSV_noti_text' => 'Are you sure you want to generate a CSV file?',
|
||||
'Maintenance_Tool_ImportCSV' => 'CSV Import',
|
||||
'Maintenance_Tool_ImportCSV_text' => 'Before using this function, please make a backup. Import a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. To do that place the CSV file named <b>devices.csv</b> into your <b>/config</b> folder.',
|
||||
'Maintenance_Tool_ImportCSV_noti' => 'CSV Import',
|
||||
'Maintenance_Tool_ImportCSV_noti_text' => 'Are you sure you want to import the CSV file? This will completely overwrite the devices in your database.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'BackDevices_Arpscan_disabled' => 'Arp-Scan Disabled',
|
||||
'BackDevices_Arpscan_enabled' => 'Arp-Scan Enabled',
|
||||
'BackDevices_darkmode_disabled' => 'Darkmode Disabled',
|
||||
'BackDevices_darkmode_enabled' => 'Darkmode Enabled',
|
||||
'BackDevices_Restore_CopError' => 'The original database could not be saved.',
|
||||
'BackDevices_Restore_okay' => 'Restore executed successfully.',
|
||||
'BackDevices_Restore_Failed' => 'Restore Failed. Please restore the backup manually.',
|
||||
'BackDevices_Backup_CopError' => 'The original database could not be saved.',
|
||||
'BackDevices_Backup_okay' => 'The backup executed successfully with the new archive',
|
||||
'BackDevices_Backup_Failed' => 'The backup executed partially successfully. The archive could not be created or is empty.',
|
||||
'BackDevices_DBTools_DelDev_a' => 'Device deleted successfully',
|
||||
'BackDevices_DBTools_DelDev_b' => 'Devices deleted successfully',
|
||||
'BackDevices_DBTools_DelEvents' => 'Events deleted successfully',
|
||||
'BackDevices_DBTools_DelEventsError' => 'Error deleting Events',
|
||||
'BackDevices_DBTools_DelDevError_a' => 'Error deleting Device',
|
||||
'BackDevices_DBTools_DelDevError_b' => 'Error deleting Devices',
|
||||
'BackDevices_DBTools_UpdDev' => 'Device updated successfully',
|
||||
'BackDevices_DBTools_UpdDevError' => 'Error updating device',
|
||||
'BackDevices_DBTools_Upgrade' => 'Database upgraded successfully',
|
||||
'BackDevices_DBTools_UpgradeError' => 'Database upgrade failed',
|
||||
'BackDevices_DBTools_Purge' => 'The oldest backups were deleted',
|
||||
'BackDevices_DBTools_ImportCSV' => 'The devices from the CSV file were imported successfully.',
|
||||
'BackDevices_DBTools_ImportCSVError' => 'The CSV file couldn\'t be imported. Make sure the format is correct.',
|
||||
'BackDevices_DBTools_ImportCSVMissing' => 'The CSV file couldn\'t be found under <b>/config/devices.csv.</b>',
|
||||
'BackDevices_Device_UpdDevError' => 'Error updating devices, try later. The database is probably locked due to an ongoing task.',
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Network Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Network_Title' => 'Network overview',
|
||||
'Network_ManageDevices' => 'Manage Devices',
|
||||
'Network_ManageAdd' => 'Add Device',
|
||||
'Network_ManageAssign' => 'Assign',
|
||||
'Network_ManageUnassign' => 'Unassign',
|
||||
'Network_ManageEdit' => 'Update Device',
|
||||
'Network_ManageDel' => 'Delete Device',
|
||||
'Network_ManageAdd_Name' => 'Device Name',
|
||||
'Network_ManageAdd_Name_text' => 'Name without special characters',
|
||||
'Network_ManageAdd_Type' => 'Device Type',
|
||||
'Network_ManageAdd_Type_text' => '-- Select Type --',
|
||||
'Network_ManageAdd_Port' => 'Port Count',
|
||||
'Network_ManageAdd_Port_text' => 'leave blank for wifi and powerline',
|
||||
'Network_ManageAdd_Submit' => 'Add Device',
|
||||
'Network_ManageEdit_ID' => 'Device to update',
|
||||
'Network_ManageEdit_ID_text' => '-- Select Device for editing --',
|
||||
'Network_ManageEdit_Name' => 'New Device Name',
|
||||
'Network_ManageEdit_Name_text' => 'Name without special characters',
|
||||
'Network_ManageEdit_Type' => 'New Device Type',
|
||||
'Network_ManageEdit_Type_text' => '-- Select Type --',
|
||||
'Network_ManageEdit_Port' => ' New Port Count',
|
||||
'Network_ManageEdit_Port_text' => 'leave blank for wifi and powerline',
|
||||
'Network_ManageEdit_Submit' => 'Save Changes',
|
||||
'Network_ManageDel_Name' => 'Device to delete',
|
||||
'Network_ManageDel_Name_text' => '-- Select Device --',
|
||||
'Network_ManageDel_Submit' => 'Delete',
|
||||
'Network_Table_State' => 'State',
|
||||
'Network_Table_Hostname' => 'Hostname',
|
||||
'Network_Table_IP' => 'IP',
|
||||
'Network_UnassignedDevices' => 'Unassigned devices',
|
||||
'Network_Assign' => 'Connect to the above <i class="fa fa-server"></i> Network node',
|
||||
'Network_Connected' => 'Connected devices',
|
||||
'Network_ManageLeaf' => 'Manage assignment',
|
||||
'Network_Node' => 'Network node',
|
||||
'Network_Node_Name' => 'Node name',
|
||||
'Network_Parent' => 'Parent network device',
|
||||
'Network_NoAssignedDevices' => 'This network node doesn\'t have any assigned devices (leaf nodes). Assign one from bellow or go to the <b><i class="fa fa-info-circle"></i> Details</b> tab of any device in <a href="devices.php"><b> <i class="fa fa-laptop"></i> Devices</b></a>, and assign it to a network <b><i class="fa fa-server"></i> Node (MAC)</b> and <b><i class="fa fa-ethernet"></i> Port</b> there.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Help Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'HelpFAQ_Title' => 'Help / FAQ',
|
||||
'HelpFAQ_Cat_General' => 'General',
|
||||
'HelpFAQ_Cat_Detail' => '<i class="fa fa-info-circle"></i> Details',
|
||||
'HelpFAQ_Cat_General_100_head' => 'The clock on the top right and the times of the events/presence are not correct (time difference).',
|
||||
'HelpFAQ_Cat_General_100_text_a' => 'On your PC the following time zone is set for the PHP environment:',
|
||||
'HelpFAQ_Cat_General_100_text_b' => 'If this is not the timezone you are in, you should change the timezone in the PHP configuration file. You can find it in this directory:',
|
||||
'HelpFAQ_Cat_General_100_text_c' => 'Search in this file for the entry "date.timezone", remove the leading ";" if necessary and enter the desired timezone. A list with the supported timezones can be found here (<a href="https://www.php.net/manual/en/timezones.php" target="blank">Link</a>)',
|
||||
'HelpFAQ_Cat_General_101_head' => 'My network seems to slow down, streaming "freezes".',
|
||||
'HelpFAQ_Cat_General_101_text' => 'It may well be that low-powered devices reach their performance limits with the way Pi.Alert detects new devices on the network. This is amplified even more,
|
||||
if these devices communicate with the network via WLAN. Solutions here would be to switch to a wired connection if possible or, if the device is only to be used for a limited period of time, to use the arp scan.
|
||||
pause the arp scan on the maintenance page.',
|
||||
'HelpFAQ_Cat_General_102_head' => 'I get the message that the database is read only.',
|
||||
'HelpFAQ_Cat_General_102_text' => 'Check in the Pi.Alert directory if the database folder (db) has been assigned the correct permissions:<br>
|
||||
<span class="text-danger help_faq_code">drwxrwx--- 2 (your username) www-data</span><br>
|
||||
If the permission is not correct, you can set it again with the following commands in the terminal or the console:<br>
|
||||
<span class="text-danger help_faq_code">
|
||||
sudo chgrp -R www-data ~/pialert/db<br>
|
||||
chmod -R 770 ~/pialert/db
|
||||
</span><br>
|
||||
If the database is still read-only, try reinstalling or restoring a database backup from the maintenance page.',
|
||||
'HelpFAQ_Cat_General_102docker_head' => 'Database issues (AJAX errors, read-only, not found)',
|
||||
'HelpFAQ_Cat_General_102docker_text' => 'Double-check you\'ve followed the <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles">dockerfile readme (most up-to-date info)</a>. <br/> <br/> <ul data-sourcepos="49:4-52:146" dir="auto">
|
||||
<li data-sourcepos="49:4-49:106">Download the <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db">original DB from GitHub</a>.</li>
|
||||
<li data-sourcepos="50:4-50:195">Map the <code>pialert.db</code> file (<g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠</g-emoji> not folder) from above to <code>/home/pi/pialert/db/pialert.db</code> (see <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples">Examples</a> for details).</li>
|
||||
<li data-sourcepos="51:4-51:161">If facing issues (AJAX errors, can\'t write to DB, etc,) make sure permissions are set correctly, alternatively check the logs under <code>/home/pi/pialert/front/log</code>.</li>
|
||||
<li data-sourcepos="52:4-52:146">To solve permission issues you can also try to create a DB backup and then run a DB Restore via the <strong>Maintenance > Backup/Restore</strong> section.</li>
|
||||
<li data-sourcepos="53:4-53:228">If the database is in read-only mode you can solve this by setting the owner and group by executing the following command on the host system: <code>docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db</code>.</li>
|
||||
</ul>',
|
||||
'HelpFAQ_Cat_General_103_head' => 'The login page does not appear, even after changing the password.',
|
||||
'HelpFAQ_Cat_General_103_text' => 'In addition to the password, the configuration file must contain <span class="text-danger help_faq_code">~/pialert/config/pialert.conf</span>
|
||||
also the parameter <span class="text-danger help_faq_code">PIALERT_WEB_PROTECTION</span> must set to <span class="text-danger help_faq_code">True</span>.',
|
||||
'HelpFAQ_Cat_Device_200_head' => 'I have devices in my list that I do not know about. After deleting them, they always reappear.',
|
||||
'HelpFAQ_Cat_Device_200_text' => 'If you use Pi-hole, please note that Pi.Alert retrieves information from Pi-hole. Pause Pi.Alert, go to the settings page in Pi-hole and
|
||||
delete the DHCP lease if necessary. Then, also in Pi-hole, look under Tools -> Network to see if you can find the recurring hosts there.
|
||||
If yes, delete them there as well. Now you can start Pi.Alert again. Now the device(s) should not show up anymore.',
|
||||
'HelpFAQ_Cat_Detail_300_head' => 'What means ',
|
||||
'HelpFAQ_Cat_Detail_300_text_a' => 'means a network device (a device of the type AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router,USB LAN Adapter, USB WIFI Adapter, or Internet).',
|
||||
'HelpFAQ_Cat_Detail_300_text_b' => 'designates the port number where the currently edited device is connected to this network device. Read <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md">this guide</a> for more info.',
|
||||
'HelpFAQ_Cat_Detail_301_head_a' => 'When is scanning now? At ',
|
||||
'HelpFAQ_Cat_Detail_301_head_b' => ' says 1min but the graph shows 5min intervals.',
|
||||
'HelpFAQ_Cat_Detail_301_text' => 'The time interval between the scans is defined by the "Cronjob", which is set to 5min by default. The designation "1min" refers to the expected duration of the scan.
|
||||
Depending on the network configuration, this time may vary. To edit the cronjob, you can use the following command in the terminal/console <span class="text-danger help_faq_code">crontab -e</span>
|
||||
and change the interval.',
|
||||
'HelpFAQ_Cat_Detail_302_head_a' => 'What means ',
|
||||
'HelpFAQ_Cat_Detail_302_head_b' => 'and why can\'t I select that?',
|
||||
'HelpFAQ_Cat_Detail_302_text' => 'Some modern devices generate random MAC addresses for privacy reasons, which can no longer be associated with any manufacturer and which change again with each new connection.
|
||||
Pi.Alert detects if it is such a random MAC address and activates this "field" automatically. To disable this behavior you have to look in your device how to disable
|
||||
MAC address randomization.',
|
||||
'HelpFAQ_Cat_Detail_303_head' => 'What is Nmap and what is it for?',
|
||||
'HelpFAQ_Cat_Detail_303_text' => 'Nmap is a network scanner with multiple capabilities.<br>
|
||||
When a new device appears in your list, you have the possibility to get more detailed information about the device via the Nmap scan.',
|
||||
'HelpFAQ_Cat_Presence_400_head' => 'Devices are displayed with a yellow marker and the note "missing event".',
|
||||
'HelpFAQ_Cat_Presence_400_text' => 'If this happens, you have the option to delete the events on the device in question (details view). Another possibility would be to switch on the device and wait until Pi.Alert detects the device as "online" with the next
|
||||
scan and then simply turn the device off again. Now Pi.Alert should properly note the state of the device in the database with the next scan.',
|
||||
'HelpFAQ_Cat_Presence_401_head' => 'A device is displayed as present although it is "Offline".',
|
||||
'HelpFAQ_Cat_Presence_401_text' => 'If this happens, you have the possibility to delete the events for the device in question (details view). Another possibility would be to switch on the device and wait until Pi.Alert recognizes the device as "online" with the next scan
|
||||
and then simply switch the device off again. Now Pi.Alert should properly note the state of the device in the database with the next scan.',
|
||||
'HelpFAQ_Cat_Network_600_head' => 'What is this page for?',
|
||||
'HelpFAQ_Cat_Network_600_text' => 'This page should offer you the possibility to map the assignment of your network devices. For this purpose, you can create one or more switches, WLANs, routers, etc., provide them with a port number if necessary and assign already detected
|
||||
devices to them. This assignment is done in the detailed view of the device to be assigned. So it is possible for you to quickly determine to which port a host is connected and if it is online. Read <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md">this guide</a> for more info.',
|
||||
'HelpFAQ_Cat_Network_601_head' => 'Are there other docs?',
|
||||
'HelpFAQ_Cat_Network_601_text' => 'Yes, there are! Check <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/">all docs</a> for more info.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Front end events
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'test_event_tooltip' => 'Save your changes at first before you test your settings.',
|
||||
'test_event_icon' => 'fa-vial-circle-check',
|
||||
'run_event_tooltip' => 'Enable the setting and save your changes at first before you run it.',
|
||||
'run_event_icon' => 'fa-play',
|
||||
'general_event_title' => 'Executing an ad-hoc event',
|
||||
'general_event_description' => ' The event you\'ve triggered might take a while until background processes finish. The execution ended once you see <code>finished</code> below. Check the <a href=\"/maintenance.php#tab_Logging\">error log</a> if you didn\'t get the expected result. <br/> <br/> Status: ',
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Plugins
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Plugins_Unprocessed_Events' => 'Unprocessed Events',
|
||||
'Plugins_Objects' => 'Plugin Objects',
|
||||
'Plugins_DeleteAll' => 'Delete all (filters are ignored)',
|
||||
'Plugins_History' => 'Events History',
|
||||
'Plugins_Filters_Mac' => 'Mac Filter',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Settings
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
'settings_missing' => 'Not all settings loaded, refresh the page! This is probably caused by a high load on the database.',
|
||||
'settings_missing_block' => 'You can\'t save your settings without specifying all setting keys. Refresh the page. This is probably caused by a high load on the database.',
|
||||
'settings_old' => 'The settings in the DB (shown on this page) are outdated. This is probably caused by a running scan. The settings were saved in the <code>pialert.conf</code> file, but the background process didn\'t have time to import it yet to the DB. You can wait until the settings get refreshed so you don\'t overwrite your old values. Feel free to save your settings either way if you don\'t mind losing the settings between the last save and now. There are also backup files created if you need to compare your settings later.',
|
||||
'settings_imported' => 'Last time settings were imported from the pialert.conf file:',
|
||||
'settings_expand_all' => 'Expand all',
|
||||
|
||||
|
||||
//General
|
||||
'General_display_name' => 'General',
|
||||
'General_icon' => '<i class="fa fa-gears"></i>',
|
||||
'ENABLE_ARPSCAN_name' => 'Enable ARP scan',
|
||||
'ENABLE_ARPSCAN_description' => 'Arp-scan is a command-line tool that uses the ARP protocol to discover and fingerprint IP hosts on the local network. An alternative to ARP scan is to enable the <a onclick="toggleAllSettings()" href="#PIHOLE_ACTIVE"><code>PIHOLE_ACTIVE</code>PiHole integration settings</a>.',
|
||||
'SCAN_SUBNETS_name' => 'Subnets to scan',
|
||||
'SCAN_SUBNETS_description' => '
|
||||
The arp-scan time itself depends on the number of IP addresses to check so set this up carefully with the appropriate network mask and interface. Check the <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md" target="_blank">subnets documentation</a> for help on setting up VLANs, what VLANs are supported, or how to figure out the network mask and your interface.
|
||||
',
|
||||
'LOG_LEVEL_name' => 'Print additional logging',
|
||||
'LOG_LEVEL_description' => 'This setting will enable more verbose logging. Useful for debugging events writing into the database.',
|
||||
'TIMEZONE_name' => 'Time zone',
|
||||
'TIMEZONE_description' => 'Time zone to display stats correctly. Find your time zone <a target="_blank" href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" rel="nofollow">here</a>.',
|
||||
'ENABLE_PLUGINS_name' => 'Enable Plugins',
|
||||
'ENABLE_PLUGINS_description' => 'Enables the <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins">plugins</a> functionality. Loading plugins requires more hardware resources so you might want to disable them on low-powered system.',
|
||||
'PLUGINS_KEEP_HIST_name' => 'Plugins History',
|
||||
'PLUGINS_KEEP_HIST_description' => 'How many entries of Plugins History scan results should be kept (globally, not device specific!).',
|
||||
'PIALERT_WEB_PROTECTION_name' => 'Enable login',
|
||||
'PIALERT_WEB_PROTECTION_description' => 'When enabled a login dialog is displayed. Read below carefully if you get locked out of your instance.',
|
||||
'PIALERT_WEB_PASSWORD_name' => 'Login password',
|
||||
'PIALERT_WEB_PASSWORD_description' => 'The default password is <code>123456</code>. To change the password run <code>/home/pi/pialert/back/pialert-cli</code> in the container',
|
||||
'INCLUDED_SECTIONS_name' => 'Notify on',
|
||||
'INCLUDED_SECTIONS_description' => 'Specifies which events trigger notifications. Remove the event type(s) you don\'t want to get notified on. This setting overrides device-specific settings in the UI. (<code>CTRL + Click</code> to select/deselect).',
|
||||
'SCAN_CYCLE_MINUTES_name' => 'Scan cycle delay',
|
||||
'SCAN_CYCLE_MINUTES_description' => 'The delay between scans in minutes. If using arp-scan, the scan time itself depends on the number of IP addresses to check. This is influenced by the network mask set in the <a href="#SCAN_SUBNETS"><code>SCAN_SUBNETS</code> setting</a> at the top. Every IP takes a couple seconds to scan.',
|
||||
'DAYS_TO_KEEP_EVENTS_name' => 'Delete events older than',
|
||||
'DAYS_TO_KEEP_EVENTS_description' => 'This is a maintenance setting. This specifies the number of days worth of event entries that will be kept. All older events will be deleted periodically. Also applies on Plugin Events History.',
|
||||
'HRS_TO_KEEP_NEWDEV_name' => 'Keep new devices for',
|
||||
'HRS_TO_KEEP_NEWDEV_description' => 'This is a maintenance setting. If enabled (<code>0</code> is disabled), devices marked as <b>New Device</b> will be deleted if their <b>First Session</b> time was older than the specified hours in this setting. Use this setting if you want to auto-delete <b>New Devices</b> after <code>X</code> hours.',
|
||||
'REPORT_DASHBOARD_URL_name' => 'Pi.Alert URL',
|
||||
'REPORT_DASHBOARD_URL_description' => 'This URL is used as the base for generating links in the emails. Enter full URL starting with <code>http://</code> including the port number (no trailig slash <code>/</code>).',
|
||||
'DIG_GET_IP_ARG_name' => 'Internet IP discovery',
|
||||
'DIG_GET_IP_ARG_description' => 'Change the <a href="https://linux.die.net/man/1/dig" target="_blank">dig utility</a> arguments if you have issues resolving your Internet IP. Arguments are added at the end of the following command: <code>dig +short </code>.',
|
||||
'UI_LANG_name' => 'UI Language',
|
||||
'UI_LANG_description' => 'Select the preferred UI language.',
|
||||
'UI_PRESENCE_name' => 'Show in presence chart',
|
||||
'UI_PRESENCE_description' => 'Select what statuses should be shown in the <b>Device presence over time</b> chart in the <a href="/devices.php" target="_blank">Devices</a> page. (<code>CTRL + Click</code> to select/deselect)',
|
||||
|
||||
|
||||
//Email
|
||||
'Email_display_name' => 'Email',
|
||||
'Email_icon' => '<i class="fa fa-at"></i>',
|
||||
'REPORT_MAIL_name' => 'Enable email',
|
||||
'REPORT_MAIL_description' => 'If enabled an email is sent out with a list of changes you\'ve subscribed to. Please also fill out all remaining settings related to the SMTP setup below. If facing issues, set <code>LOG_LEVEL</code> to <code>debug</code> and check the <a href=\"/maintenance.php#tab_Logging\">error log</a>.',
|
||||
'SMTP_SERVER_name' => 'SMTP server URL',
|
||||
'SMTP_SERVER_description' => 'The SMTP server host URL. For example <code>smtp-relay.sendinblue.com</code>. To use Gmail as an SMTP server <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SMTP_GMAIL.md">follow this guide</a>',
|
||||
'SMTP_PORT_name' => 'SMTP server PORT',
|
||||
'SMTP_PORT_description' => 'Port number used for the SMTP connection. Set to <code>0</code> if you don\'t want to use a port when connecting to the SMTP server.',
|
||||
'SMTP_SKIP_LOGIN_name' => 'Skip authentication',
|
||||
'SMTP_SKIP_LOGIN_description' => 'Don\'t use authentication when connecting to the SMTP server.',
|
||||
'SMTP_USER_name' => 'SMTP user',
|
||||
'SMTP_USER_description' => 'The user name used to login into the SMTP server (sometimes a full email address).',
|
||||
'SMTP_PASS_name' => 'SMTP password',
|
||||
'SMTP_PASS_description' => 'The SMTP server password. ',
|
||||
'SMTP_SKIP_TLS_name' => 'Don\'t use TLS',
|
||||
'SMTP_SKIP_TLS_description' => 'Disable TLS when connecting to your SMTP server.',
|
||||
'SMTP_FORCE_SSL_name' => 'Force SSL',
|
||||
'SMTP_FORCE_SSL_description' => 'Force SSL when connecting to your SMTP server.',
|
||||
'REPORT_TO_name' => 'Send email to',
|
||||
'REPORT_TO_description' => 'Email address to which the notification will be send to.',
|
||||
'REPORT_FROM_name' => 'Email subject',
|
||||
'REPORT_FROM_description' => 'Notification email subject line. Some SMTP servers need this to be an email.',
|
||||
|
||||
//Webhooks
|
||||
'Webhooks_display_name' => 'Webhooks',
|
||||
'Webhooks_icon' => '<i class="fa fa-circle-nodes"></i>',
|
||||
'REPORT_WEBHOOK_name' => 'Enable Webhooks',
|
||||
'REPORT_WEBHOOK_description' => 'Enable webhooks for notifications. Webhooks help you to connect to a lot of 3rd party tools, such as IFTTT, Zapier or <a href="https://n8n.io/" target="_blank">n8n</a> to name a few. Check out this simple <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md" target="_blank">n8n guide here</a> to get started. If enabled, configure related settings below.',
|
||||
'WEBHOOK_URL_name' => 'Target URL',
|
||||
'WEBHOOK_URL_description' => 'Target URL starting with <code>http://</code> or <code>https://</code>.',
|
||||
'WEBHOOK_PAYLOAD_name' => 'Payload type',
|
||||
'WEBHOOK_PAYLOAD_description' => 'The Webhook payload data format for the <code>body</code> > <code>attachments</code> > <code>text</code> attribute in the payload json. See an example of the payload <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json">here</a>. (e.g.: for discord use <code>text</code>)',
|
||||
'WEBHOOK_REQUEST_METHOD_name' => 'Request method',
|
||||
'WEBHOOK_REQUEST_METHOD_description' => 'The HTTP request method to be used for the webhook call.',
|
||||
'WEBHOOK_SIZE_name' => 'Max payload size',
|
||||
'WEBHOOK_SIZE_description' => 'The maximum size of the webhook payload as number of characters in the passed string. If above limit, it will be truncated and a <code>(text was truncated)</code> message is appended.',
|
||||
|
||||
// Apprise
|
||||
'Apprise_display_name' => 'Apprise',
|
||||
'Apprise_icon' => '<i class="fa fa-bullhorn"></i>',
|
||||
'REPORT_APPRISE_name' => 'Enable Apprise',
|
||||
'REPORT_APPRISE_description' => 'Enable sending notifications via <a target="_blank" href="https://hub.docker.com/r/caronc/apprise">Apprise</a>.',
|
||||
'APPRISE_HOST_name' => 'Apprise host URL',
|
||||
'APPRISE_HOST_description' => 'Apprise host URL starting with <code>http://</code> or <code>https://</code>. (don\'t forget to include <code>/notify</code> at the end)',
|
||||
'APPRISE_URL_name' => 'Apprise notification URL',
|
||||
'APPRISE_URL_description' => 'Apprise notification target URL. For example for Telegram it would be <code>tgram://{bot_token}/{chat_id}</code>.',
|
||||
|
||||
// NTFY
|
||||
'NTFY_display_name' => 'NTFY',
|
||||
'NTFY_icon' => '<i class="fa fa-terminal"></i>',
|
||||
'REPORT_NTFY_name' => 'Enable NTFY',
|
||||
'REPORT_NTFY_description' => 'Enable sending notifications via <a target="_blank" href="https://ntfy.sh/">NTFY</a>.',
|
||||
'NTFY_HOST_name' => 'NTFY host URL',
|
||||
'NTFY_HOST_description' => 'NTFY host URL starting with <code>http://</code> or <code>https://</code>. You can use the hosted instance on <a target="_blank" href="https://ntfy.sh/">https://ntfy.sh</a> by simply entering <code>https://ntfy.sh</code>.',
|
||||
'NTFY_TOPIC_name' => 'NTFY topic',
|
||||
'NTFY_TOPIC_description' => 'Your secret topic.',
|
||||
'NTFY_USER_name' => 'NTFY user',
|
||||
'NTFY_USER_description' => 'Enter user if you need (host) an instance with enabled authetication.',
|
||||
'NTFY_PASSWORD_name' => 'NTFY password',
|
||||
'NTFY_PASSWORD_description' => 'Enter password if you need (host) an instance with enabled authetication.',
|
||||
|
||||
// Pushsafer
|
||||
'PUSHSAFER_display_name' => 'Pushsafer',
|
||||
'PUSHSAFER_icon' => '<i class="fa fa-bell"></i>',
|
||||
'REPORT_PUSHSAFER_name' => 'Enable Pushsafer',
|
||||
'REPORT_PUSHSAFER_description' => 'Enable sending notifications via <a target="_blank" href="https://www.pushsafer.com/">Pushsafer</a>.',
|
||||
'PUSHSAFER_TOKEN_name' => 'Pushsafer token',
|
||||
'PUSHSAFER_TOKEN_description' => 'Your secret Pushsafer API key (token).',
|
||||
'APPRISE_PAYLOAD_name' => 'Payload type',
|
||||
'APPRISE_PAYLOAD_description' => 'Select the payoad type sent to Apprise. For example <code>html</code> works well with emails, <code>text</code> with chat apps, such as Telegram.',
|
||||
|
||||
|
||||
// MQTT
|
||||
'MQTT_display_name' => 'MQTT',
|
||||
'MQTT_icon' => '<i class="fa fa-square-rss"></i>',
|
||||
'REPORT_MQTT_name' => 'Enable MQTT',
|
||||
'REPORT_MQTT_description' => 'Enable sending notifications via <a target="_blank" href="https://www.home-assistant.io/integrations/mqtt/">MQTT</a> to your Home Assistance instance.',
|
||||
'MQTT_BROKER_name' => 'MQTT broker URL',
|
||||
'MQTT_BROKER_description' => 'MQTT host URL (don\'t include <code>http://</code> or <code>https://</code>).',
|
||||
'MQTT_PORT_name' => 'MQTT broker port',
|
||||
'MQTT_PORT_description' => 'Port number where the broker is listening. Usually <code>1883</code>.',
|
||||
'MQTT_USER_name' => 'MQTT user',
|
||||
'MQTT_USER_description' => 'User name used to login into your MQTT broker instance.',
|
||||
'MQTT_PASSWORD_name' => 'MQTT password',
|
||||
'MQTT_PASSWORD_description' => 'Password used to login into your MQTT broker instance.',
|
||||
'MQTT_QOS_name' => 'MQTT Quality of Service',
|
||||
'MQTT_QOS_description' => 'Quality of service setting for MQTT message sending. <code>0</code> - Low quality to <code>2</code> - High quality. The higher the quality the longer the delay.',
|
||||
'MQTT_DELAY_SEC_name' => 'MQTT delay per device',
|
||||
'MQTT_DELAY_SEC_description' => 'A little hack - delay adding to the queue in case the process is restarted and previous publish processes aborted (it takes ~<code>2</code>s to update a sensor config on the broker). Tested with <code>2</code>-<code>3</code> seconds of delay. This delay is only applied when devices are created (during the first notification loop). It doesn\'t affect subsequent scans or notifications.',
|
||||
|
||||
//DynDNS
|
||||
'DynDNS_display_name' => 'DynDNS',
|
||||
'DynDNS_icon' => '<i class="fa fa-globe"></i>',
|
||||
'DDNS_ACTIVE_name' => 'Enable DynDNS',
|
||||
'DDNS_ACTIVE_description' => '',
|
||||
'DDNS_DOMAIN_name' => 'DynDNS domain URL',
|
||||
'DDNS_DOMAIN_description' => '',
|
||||
'DDNS_USER_name' => 'DynDNS user',
|
||||
'DDNS_USER_description' => '',
|
||||
'DDNS_PASSWORD_name' => 'DynDNS password',
|
||||
'DDNS_PASSWORD_description' => '',
|
||||
'DDNS_UPDATE_URL_name' => 'DynDNS update URL',
|
||||
'DDNS_UPDATE_URL_description' => 'Update URL starting with <code>http://</code> or <code>https://</code>.',
|
||||
|
||||
// PiHole
|
||||
'PiHole_display_name' => 'PiHole',
|
||||
'PiHole_icon' => '<i class="fa fa-seedling"></i>',
|
||||
'PIHOLE_ACTIVE_name' => 'Enable PiHole mapping',
|
||||
'PIHOLE_ACTIVE_description' => 'You need to map<code>:/etc/pihole/pihole-FTL.db</code> in the <code>docker-compose.yml</code> file if you enable this setting.',
|
||||
'DHCP_ACTIVE_name' => 'Enable PiHole DHCP',
|
||||
'DHCP_ACTIVE_description' => 'You need to map <code>:/etc/pihole/dhcp.leases</code> in the <code>docker-compose.yml</code> file if you enable this setting.',
|
||||
|
||||
// Pholus
|
||||
'Pholus_display_name' => 'Pholus',
|
||||
'Pholus_icon' => '<i class="fa fa-search"></i>',
|
||||
'PHOLUS_ACTIVE_name' => 'Cycle run',
|
||||
'PHOLUS_ACTIVE_description' => '<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/pholus" target="_blank" >Pholus</a> is a sniffing tool to discover additional information about the devices on the network, including the device name. If enabled this will execute the scan before every network scan cycle until there are no <code>(unknown)</code> or <code>(name not found)</code> devices. Please be aware it can spam the network with unnecessary traffic. Depends on the <a onclick="toggleAllSettings()" href="#SCAN_SUBNETS"><code>SCAN_SUBNETS</code> setting</a>. For a scheduled or one-off scan, check the <a href="#PHOLUS_RUN"><code>PHOLUS_RUN</code> setting</a>.',
|
||||
'PHOLUS_TIMEOUT_name' => 'Cycle run timeout',
|
||||
'PHOLUS_TIMEOUT_description' => 'How long in seconds should Pholus be sniffing on each interface if above condition is fulfilled. The longer you leave it on, the more likely devices would broadcast more info. This timeout adds to the time it takes to perform an arp-scan on your network.',
|
||||
'PHOLUS_FORCE_name' => 'Cycle force scan',
|
||||
'PHOLUS_FORCE_description' => 'Force scan every network scan, even if there are no <code>(unknown)</code> or <code>(name not found)</code> devices. Be careful enabling this as the sniffing can easily flood your network.',
|
||||
'PHOLUS_RUN_name' => 'Scheduled run',
|
||||
'PHOLUS_RUN_description' => 'Enable a regular Pholus scan / sniff on your network. The scheduling settings can be found below. If you select <code>once</code> Pholus is run only once on start for the time specified in <a href="#PHOLUS_RUN_TIMEOUT"><code>PHOLUS_RUN_TIMEOUT</code> setting</a>.',
|
||||
'PHOLUS_RUN_TIMEOUT_name' => 'Scheduled run timeout',
|
||||
'PHOLUS_RUN_TIMEOUT_description' => 'The timeout in seconds for the scheduled Pholus scan. Same notes regarding the duration apply as on the <a href="#PHOLUS_TIMEOUT"><code>PHOLUS_TIMEOUT</code> setting</a>. A scheduled scan doesn\'t check if there are <code>(unknown)</code> or <code>(name not found)</code> devices, the scan is executed either way.',
|
||||
'PHOLUS_RUN_SCHD_name' => 'Schedule',
|
||||
'PHOLUS_RUN_SCHD_description' => 'Only enabled if you select <code>schedule</code> in the <a href="#PHOLUS_RUN"><code>PHOLUS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format
|
||||
(e.g. validate at <a href="https://crontab.guru/" target="_blank">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick="toggleAllSettings()" href="#TIMEZONE"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes.',
|
||||
'PHOLUS_DAYS_DATA_name' => 'Data retention',
|
||||
'PHOLUS_DAYS_DATA_description' => 'How many days of Pholus scan entries should be kept (globally, not device specific!) Enter <code>0</code> to disable.',
|
||||
|
||||
|
||||
// Nmap
|
||||
'Nmap_display_name' => 'Nmap',
|
||||
'Nmap_icon' => '<i class="fa fa-ethernet"></i>',
|
||||
'NMAP_ACTIVE_name' => 'Cycle run',
|
||||
'NMAP_ACTIVE_description' => 'If enabled this will execute a scan on a newly found device. For a scheduled or one-off scan, check the <a href="#NMAP_RUN"><code>NMAP_RUN</code> setting</a>.',
|
||||
'NMAP_TIMEOUT_name' => 'Run timeout',
|
||||
'NMAP_TIMEOUT_description' => 'Maximum time in seconds to wait for an Nmap scan to finish on any device.',
|
||||
'NMAP_RUN_name' => 'Scheduled run',
|
||||
'NMAP_RUN_description' => 'Enable a regular Nmap scan on your network on all devices. The scheduling settings can be found below. If you select <code>once</code> Nmap is run only once on start for the time specified in <a href="#NMAP_TIMEOUT"><code>NMAP_TIMEOUT</code> setting</a>.',
|
||||
'NMAP_RUN_SCHD_name' => 'Schedule',
|
||||
'NMAP_RUN_SCHD_description' => 'Only enabled if you select <code>schedule</code> in the <a href="#NMAP_RUN"><code>NMAP_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format.',
|
||||
'NMAP_ARGS_name' => 'Arguments',
|
||||
'NMAP_ARGS_description' => 'Arguments used to run the Nmap scan. Be careful to specify <a href="https://linux.die.net/man/1/nmap" target="_blank">the arguments</a> correctly. For example <code>-p -10000</code> scans ports from 1 to 10000.',
|
||||
|
||||
// API
|
||||
'API_display_name' => 'API',
|
||||
'API_icon' => '<i class="fa fa-arrow-down-up-across-line"></i>',
|
||||
'API_CUSTOM_SQL_name' => 'Custom endpoint',
|
||||
'API_CUSTOM_SQL_description' => 'You can specify a custom SQL query which will generate a JSON file and then expose it via the <a href="/api/table_custom_endpoint.json" target="_blank"><code>table_custom_endpoint.json</code> file endpoint</a>.',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
648
front/php/templates/language/es_es.json
Executable file
648
front/php/templates/language/es_es.json
Executable file
@@ -0,0 +1,648 @@
|
||||
{
|
||||
"es_es": {
|
||||
"About_Title": "Open Source Network Guard",
|
||||
"About_Design" : "Diseñado para:",
|
||||
"About_Exit" : "Salir",
|
||||
"Gen_Delete" : "Eliminar",
|
||||
"Gen_DeleteAll" : "Eliminar todo",
|
||||
"Gen_Cancel" : "Cancelar",
|
||||
"Gen_Okay" : "Aceptar",
|
||||
"Gen_Save" : "Guardar",
|
||||
"Gen_Saved" : "Guardado",
|
||||
"Gen_Run" : "Ejecutar",
|
||||
"Gen_Copy" : "Ejecutar",
|
||||
"Gen_Action" : "Acción",
|
||||
"Gen_Purge" : "Purgar",
|
||||
"Gen_Backup" : "Ejecutar copia de seguridad",
|
||||
"Gen_Restore" : "Ejecutar restauración",
|
||||
"Gen_Switch" : "Cambiar",
|
||||
"Gen_AreYouSure" : "¿Estás seguro de",
|
||||
"Gen_Upd" : "Actualizado correctamente",
|
||||
"Gen_Upd_Fail" : "Fallo al actualizar",
|
||||
"Gen_ReadDocs" : "Ayuda",
|
||||
"Gen_DataUpdatedUITakesTime" : "Correcto - La interfaz puede tardar en actualizarse si se está ejecutando un escaneo.",
|
||||
"Gen_LockedDB" : "Fallo - La base de datos puede estar bloqueada - Pulsa F1 -> Ajustes de desarrolladores -> Consola o prueba más tarde.",
|
||||
"Login_Box" : "Ingrese su contraseña",
|
||||
"Login_Remember" : "Recordar",
|
||||
"Login_Remember_small" : "(válido por 7 días)",
|
||||
"Login_Submit" : "Ingresar",
|
||||
"Login_Psw_run" : "Para cambiar contraseña ejecute:",
|
||||
"Login_Psw_new" : "nueva_contraseña",
|
||||
"Login_Psw_folder" : "en la carpeta config.",
|
||||
"Login_Psw_alert" : "¡Alerta de Contraseña!",
|
||||
"Login_Psw-box" : "Contraseña",
|
||||
"Login_Toggle_Info" : "Información sobre la contraseña",
|
||||
"Login_Toggle_Info_headline" : "Información sobre la contraseña",
|
||||
"Login_Toggle_Alert_headline" : "Alerta de Contraseña!",
|
||||
"Login_Default_PWD" : "La contraseña por defecto \"123456\" sigue activa.",
|
||||
"Navigation_Devices" : "Dispositivos",
|
||||
"Navigation_Presence" : "Historial",
|
||||
"Navigation_Events" : "Eventos",
|
||||
"Navigation_Report" : "Reporte",
|
||||
"Navigation_Network" : "Red",
|
||||
"Navigation_Plugins" : "Plugins",
|
||||
"Navigation_Maintenance" : "Mantenimiento",
|
||||
"Navigation_Settings" : "Configuración",
|
||||
"Navigation_Flows" : "Flows",
|
||||
"Navigation_SystemInfo" : "Info del sistema",
|
||||
"Navigation_HelpFAQ" : "Ayuda / FAQ",
|
||||
"Device_Title" : "Dispositivos",
|
||||
"Device_Shortcut_AllDevices" : "Todos",
|
||||
"Device_Shortcut_Connected" : "Conectado(s)",
|
||||
"Device_Shortcut_Favorites" : "Favorito(s)",
|
||||
"Device_Shortcut_NewDevices" : "Nuevo(s)",
|
||||
"Device_Shortcut_DownAlerts" : "Alerta(s) de caída(s)",
|
||||
"Device_Shortcut_Archived" : "Archivado(s)",
|
||||
"Device_Shortcut_Devices" : "Dispositivos",
|
||||
"Device_Shortcut_OnlineChart" : "Presencia del dispositivo a lo largo del tiempo",
|
||||
"Device_TableHead_Name" : "Nombre",
|
||||
"Device_TableHead_Owner" : "Propietario",
|
||||
"Device_TableHead_Type" : "Tipo",
|
||||
"Device_TableHead_Icon" : "Icon",
|
||||
"Device_TableHead_RowID" : "Row ID",
|
||||
"Device_TableHead_Rowid" : "Row ID",
|
||||
"Device_TableHead_Parent_MAC" : "Nodo principal de la MAC",
|
||||
"Device_TableHead_Connected_Devices" : "Dispositivos conectados",
|
||||
"Device_TableHead_Location" : "Ubicación",
|
||||
"Device_TableHead_Vendor" : "Fabricante",
|
||||
"Device_TableHead_Port" : "Puerto",
|
||||
"Device_TableHead_Favorite" : "Favorito",
|
||||
"Device_TableHead_Group" : "Grupo",
|
||||
"Device_TableHead_FirstSession" : "1ra. sesión",
|
||||
"Device_TableHead_LastSession" : "Última sesión",
|
||||
"Device_TableHead_LastIP" : "Última IP",
|
||||
"Device_TableHead_MAC" : "MAC",
|
||||
"Device_TableHead_MAC_full" : "MAC completa",
|
||||
"Device_TableHead_LastIPOrder" : "Última orden de IP",
|
||||
"Device_TableHead_Status" : "Estado",
|
||||
"Device_Searchbox" : "Búsqueda",
|
||||
"Device_Tablelenght" : "Mostrar _MENU_ entradas",
|
||||
"Device_Tablelenght_all" : "Todos",
|
||||
"Device_Table_info" : "Mostrando el INICIO y el FINAL de TODAS las entradas",
|
||||
"Device_Table_nav_next" : "Siguiente",
|
||||
"Device_Table_nav_prev" : "Anterior",
|
||||
"Presence_Title" : "Historial por dispositivo",
|
||||
"Presence_Loading" : "Cargando...",
|
||||
"Loading" : "Cargando...",
|
||||
"Presence_Shortcut_AllDevices" : "Todos",
|
||||
"Presence_Shortcut_Connected" : "Conectado(s)",
|
||||
"Presence_Shortcut_Favorites" : "Favorito(s)",
|
||||
"Presence_Shortcut_NewDevices" : "Nuevo(s)",
|
||||
"Presence_Shortcut_DownAlerts" : "Alerta(s) de caída(s)",
|
||||
"Presence_Shortcut_Archived" : "Archivado(s)",
|
||||
"Presence_Shortcut_Devices" : "Dispositivos",
|
||||
"Presence_CallHead_Devices" : "Dispositivos",
|
||||
"Presence_CalHead_lang" : "es-es",
|
||||
"Presence_CalHead_year" : "año",
|
||||
"Presence_CalHead_quarter" : "trimestre",
|
||||
"Presence_CalHead_month" : "mes",
|
||||
"Presence_CalHead_week" : "semana",
|
||||
"Presence_CalHead_day" : "día",
|
||||
"Events_Title" : "Eventos",
|
||||
"Events_Loading" : "Cargando...",
|
||||
"Events_Periodselect_today" : "Hoy",
|
||||
"Events_Periodselect_LastWeek" : "La semana pasada",
|
||||
"Events_Periodselect_LastMonth" : "El mes pasado",
|
||||
"Events_Periodselect_LastYear" : "El año pasado",
|
||||
"Events_Periodselect_All" : "Toda la información",
|
||||
"Events_Shortcut_AllEvents" : "Todos los eventos",
|
||||
"Events_Shortcut_Sessions" : "Sesiones",
|
||||
"Events_Shortcut_MissSessions" : "Sesiones faltantes",
|
||||
"Events_Shortcut_VoidSessions" : "Sesiones anuladas",
|
||||
"Events_Shortcut_NewDevices" : "Nuevo(s)",
|
||||
"Events_Shortcut_DownAlerts" : "Alerta(s) de caída(s)",
|
||||
"Events_Shortcut_Events" : "Eventos",
|
||||
"Events_TableHead_Order" : "Ordenar",
|
||||
"Events_TableHead_Device" : "Dispositivo",
|
||||
"Events_TableHead_Owner" : "Propietario",
|
||||
"Events_TableHead_Date" : "Fecha",
|
||||
"Events_TableHead_EventType" : "Tipo de evento",
|
||||
"Events_TableHead_Connection" : "Conexión",
|
||||
"Events_TableHead_Disconnection" : "Desconexión",
|
||||
"Events_TableHead_Duration" : "Duración",
|
||||
"Events_TableHead_DurationOrder" : "Orden de duración",
|
||||
"Events_TableHead_IP" : "Dirección IP",
|
||||
"Events_TableHead_IPOrder" : "Orden de IP",
|
||||
"Events_TableHead_AdditionalInfo" : "Información adicional",
|
||||
"Events_Searchbox" : "Búsqueda",
|
||||
"Events_Tablelenght" : "Mostrando entradas del MENÚ",
|
||||
"Events_Tablelenght_all" : "Todos",
|
||||
"Events_Table_info" : "Mostrando el INICIO y el FINAL de TODAS las entradas",
|
||||
"Events_Table_nav_next" : "Siguiente",
|
||||
"Events_Table_nav_prev" : "Anterior",
|
||||
"DevDetail_Loading" : "Cargando ...",
|
||||
"DevDetail_Periodselect_today" : "Hoy",
|
||||
"DevDetail_Periodselect_LastWeek" : "La semana pasada",
|
||||
"DevDetail_Periodselect_LastMonth" : "El mes pasado",
|
||||
"DevDetail_Periodselect_LastYear" : "El año pasado",
|
||||
"DevDetail_Periodselect_All" : "Toda la información",
|
||||
"DevDetail_Shortcut_CurrentStatus" : "Estado actual",
|
||||
"DevDetail_Shortcut_Sessions" : "Sesiones",
|
||||
"DevDetail_Shortcut_Presence" : "Historial",
|
||||
"DevDetail_Shortcut_DownAlerts" : "Alerta(s) de caída(s)",
|
||||
"DevDetail_Tab_Details" : "<i class=\"fa fa-info-circle\"></i> Detalles",
|
||||
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Herramientas",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Title": "Información de Internet",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Description": "La herramienta de información de internet muestra información sobre la conexión a Internet, como dirección IP, ciudad, país, código de área y zona horaria.",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Start": "Iniciar información de Internet",
|
||||
"DevDetail_Tab_Tools_Internet_Info_Error": "Se ha producido un error",
|
||||
"DevDetail_Tab_Tools_Nslookup_Title": "Nslookup",
|
||||
"DevDetail_Tab_Tools_Nslookup_Description": "Nslookup es una herramienta de línea de comandos que se utiliza para realizar consultas al Sistema de nombres de dominio (DNS). El DNS es un sistema que traduce nombres de dominio, como www.google.com, a direcciones IP, como 172.217.0.142.",
|
||||
"DevDetail_Tab_Tools_Nslookup_Start": "Iniciar Nslookup",
|
||||
"DevDetail_Tab_Tools_Nslookup_Error": "Error: la dirección IP no es válida",
|
||||
"DevDetail_Tab_Tools_Speedtest_Title": "Prueba Speedtest",
|
||||
"DevDetail_Tab_Tools_Speedtest_Description": "La herramienta Speedtest mide la velocidad de descarga, la velocidad de subida y la latencia de la conexión a Internet.",
|
||||
"DevDetail_Tab_Tools_Speedtest_Start": "Iniciar Speedtest",
|
||||
"DevDetail_Tab_Tools_Traceroute_Title": "Traceroute",
|
||||
"DevDetail_Tab_Tools_Traceroute_Description": "Traceroute es un comando de diagnóstico de red que se utiliza para rastrear la ruta que toman los paquetes de datos desde un host a otro.<br><br>El comando utiliza el protocolo de mensajes de control de Internet (ICMP) para enviar paquetes a los nodos intermedios en la ruta, cada nodo intermedio responde con un paquete ICMP de tiempo de vida agotado (TTL agotado).<br><br>La salida del comando traceroute muestra la dirección IP de cada nodo intermedio en la ruta.<br><br>El comando traceroute se puede usar para diagnosticar problemas de red, como retrasos, pérdida de paquetes y rutas bloqueadas.<br><br>También se puede usar para identificar la ubicación de un nodo intermedio en una red.",
|
||||
"DevDetail_Tab_Tools_Traceroute_Start": "Iniciar Traceroute",
|
||||
"DevDetail_Tab_Tools_Traceroute_Error": "Error: la dirección IP no es válida",
|
||||
"DevDetail_Tab_Nmap" : "<i class=\"fa fa-ethernet\"></i> Nmap",
|
||||
"DevDetail_Tab_Sessions" : "<i class=\"fa fa-list-ol\"></i> Sesiones",
|
||||
"DevDetail_Tab_Presence" : "<i class=\"fa fa-calendar\"></i> Historial",
|
||||
"DevDetail_Tab_Events" : "<i class=\"fa fa-bolt\"></i> Eventos",
|
||||
"DevDetail_Tab_EventsTableDate" : "Fecha",
|
||||
"DevDetail_Tab_EventsTableEvent" : "Tipo de evento",
|
||||
"DevDetail_Tab_EventsTableIP" : "IP",
|
||||
"DevDetail_Tab_EventsTableInfo" : "Información adicional",
|
||||
"DevDetail_Tab_Plugins" : "<i class=\"fa fa-plug\"></i> Plugins",
|
||||
"DevDetail_Tab_NmapTableHeader" : "Resultados del escaneo programado",
|
||||
"DevDetail_Tab_NmapTableText" : "Establece la programación en los <a href=\"/settings.php#NMAP_ACTIVE\">Ajustes</a>",
|
||||
"DevDetail_Tab_NmapEmpty" : "Ningún puerto detectado en este dispositivo con Nmap.",
|
||||
"DevDetail_Tab_NmapTableIndex": "Índice",
|
||||
"DevDetail_Tab_NmapTableTime": "Tiempo",
|
||||
"DevDetail_Tab_NmapTablePort": "Puerto",
|
||||
"DevDetail_Tab_NmapTableState": "Estado",
|
||||
"DevDetail_Tab_NmapTableService": "Servicio",
|
||||
"DevDetail_Tab_NmapTableExtra": "Extra",
|
||||
"DevDetail_MainInfo_Title" : "<i class=\"fa fa-pencil\"></i> Información principal",
|
||||
"DevDetail_MainInfo_mac" : "MAC",
|
||||
"DevDetail_MainInfo_Name" : "Nombre",
|
||||
"DevDetail_MainInfo_Owner" : "Propietario",
|
||||
"DevDetail_MainInfo_Type" : "Tipo",
|
||||
"DevDetail_Icon" : "Icono",
|
||||
"DevDetail_Icon_Descr" : "Ingrese un nombre de icono de fuente awesome sin el prefijo fa- o con clase completa, por ejemplo: fa fa-skin fa-apple.",
|
||||
"DevDetail_MainInfo_Vendor" : "Proveedor",
|
||||
"DevDetail_MainInfo_Favorite" : "Favorito",
|
||||
"DevDetail_MainInfo_Group" : "Grupo",
|
||||
"DevDetail_MainInfo_Location" : "Ubicación",
|
||||
"DevDetail_MainInfo_Comments" : "Comentario",
|
||||
"DevDetail_MainInfo_Network_Title" : "<i class=\"fa fa-network-wired\"></i> Red",
|
||||
"DevDetail_MainInfo_Network" : "<i class=\"fa fa-server\"></i> Nodo (MAC)",
|
||||
"DevDetail_GoToNetworkNode" : "Navegar a la página de Internet del nodo seleccionado.",
|
||||
"DevDetail_MainInfo_Network_Port" : "<i class=\"fa fa-ethernet\"></i> Puerto de Red HW",
|
||||
"DevDetail_SessionInfo_Title" : "<i class=\"fa fa-calendar\"></i> Información de sesión",
|
||||
"DevDetail_SessionInfo_Status" : "Estado",
|
||||
"DevDetail_SessionInfo_FirstSession" : "1ra. sesión",
|
||||
"DevDetail_SessionInfo_LastSession" : "Última sesión",
|
||||
"DevDetail_SessionInfo_LastIP" : "Última IP",
|
||||
"DevDetail_SessionInfo_StaticIP" : "IP estática",
|
||||
"DevDetail_EveandAl_Title" : "<i class=\"fa fa-bolt\"></i> Configuración de eventos y alertas",
|
||||
"DevDetail_EveandAl_ScanCycle" : "Ciclo de escaneo",
|
||||
"DevDetail_EveandAl_AlertAllEvents" : "Alerta a todos los eventos",
|
||||
"DevDetail_EveandAl_AlertDown" : "Alerta de caída",
|
||||
"DevDetail_EveandAl_Skip" : "Omitir notificaciones repetidas durante",
|
||||
"DevDetail_EveandAl_NewDevice" : "Nuevo dispositivo",
|
||||
"DevDetail_EveandAl_Archived" : "Archivada",
|
||||
"DevDetail_EveandAl_RandomMAC" : "MAC al azar",
|
||||
"DevDetail_EveandAl_ScanCycle_a" : "Escanear Dispositivo",
|
||||
"DevDetail_EveandAl_ScanCycle_z" : "No Escanear Dispositivo",
|
||||
"DevDetail_button_Delete" : "Eliminar dispositivo",
|
||||
"DevDetail_button_DeleteEvents" : "Eliminar eventos",
|
||||
"DevDetail_button_DeleteEvents_Warning" : "¿Desea eliminar todos los eventos de este dispositivo?<br><br>(se eliminarán el <b>Historial de eventos</b> y las <b>Sesiones</b>, y puede ayudar en el caso de notificaciones constantes)",
|
||||
"DevDetail_button_Reset" : "Restablecer cambios",
|
||||
"DevDetail_button_Save" : "Guardar",
|
||||
"DevDetail_button_OverwriteIcons" : "Sobreescribir iconos",
|
||||
"DevDetail_button_OverwriteIcons_Tooltip" : "Sobreescribir los iconos de todos los dispositivos con el mismo tipo",
|
||||
"DevDetail_button_OverwriteIcons_Warning" : "¿Sobreescribir todos los iconos de todos los dispositivos con el mismo tipo que el dispositivo actual?",
|
||||
"DevDetail_SessionTable_Order" : "Ordenar",
|
||||
"DevDetail_SessionTable_Connection" : "Conexión",
|
||||
"DevDetail_SessionTable_Disconnection" : "Desconexión",
|
||||
"DevDetail_SessionTable_Duration" : "Duración",
|
||||
"DevDetail_SessionTable_IP" : "Dirección IP",
|
||||
"DevDetail_SessionTable_Additionalinfo" : "Información adicional",
|
||||
"DevDetail_Events_CheckBox" : "Ocultar eventos de conexión",
|
||||
"DevDetail_Nmap_buttonFast" : "Exploración rápida",
|
||||
"DevDetail_Nmap_buttonDefault" : "Escaneado predeterminado",
|
||||
"DevDetail_Nmap_buttonDetail" : "Escaneo detallado",
|
||||
"DevDetail_Nmap_buttonFast_text" : "Escaneo rápido: escanee menos puertos (100) que el escaneo predeterminado (unos pocos segundos)",
|
||||
"DevDetail_Nmap_buttonDefault_text" : "Escaneo predeterminado: NMAP escanea los 1,000 puertos principales para cada protocolo de escaneo solicitado. Esto atrapa aproximadamente el 93% de los puertos TCP y el 49% de los puertos UDP. (aproximadamente 5 segundos)",
|
||||
"DevDetail_Nmap_buttonDetail_text" : "Escaneo detallado: escaneo predeterminado con detección de sistema operativo habilitado, detección de versiones, escaneo de script y traceroute (hasta 30 segundos o más)",
|
||||
"DevDetail_Nmap_buttonSkipDiscovery" : "Omitir detección de host",
|
||||
"DevDetail_Nmap_buttonSkipDiscovery_text" : "Omitir detección de host (-Pn opción): Escaneo predeterminado sin detección de host",
|
||||
"DevDetail_Nmap_resultsLink" : "Puedes abandonar esta página después de empezar un escaneo. Los resultados también estarán disponibles en el archivo <code>pialert_front.log</code>.",
|
||||
"DevDetail_Nmap_Scans": "Escaneos de Nmap",
|
||||
"BackDevDetail_Actions_Title_Run" : "Ejecutar acción",
|
||||
"BackDevDetail_Actions_Not_Registered" : "Acción no registrada: ",
|
||||
"BackDevDetail_Actions_Ask_Run" : "¿Desea ejecutar la acción?",
|
||||
"BackDevDetail_Tools_WOL_okay" : "El comando se ha ejecutado correctamente.",
|
||||
"BackDevDetail_Tools_WOL_error" : "Ha ocurrido un error al ejectuar el comando.",
|
||||
"DevDetail_Tools_WOL_noti" : "Wake-on-LAN",
|
||||
"DevDetail_Tools_WOL_noti_text" : "El comando de Wake-on-LAN en enviado a la dirección de escucha. Si el dispositivo no está en la misma subred/vlan que Pi.Alert, el dispositivo no responderá.",
|
||||
"DevDetail_Tools_WOL" : "Enviar comando WOL a ",
|
||||
"DevDetail_WOL_Title" : "<i class=\"fa fa-power-off\"></i> Wake-on-LAN",
|
||||
"DevDetail_Run_Actions_Title" : "<i class=\"fa fa-play\"></i> Ejecutar acción en el dispositivo",
|
||||
"DevDetail_Run_Actions_Tooltip" : "Ejecutar la acción del desplegable sobre el dispositivo actual.",
|
||||
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalles del dispositivo",
|
||||
"DevDetail_Copy_Device_Tooltip": "Copiar detalles del dispositivo de la lista desplegable. Todo en esta página se sobrescribirá",
|
||||
"BackDevDetail_Copy_Title": "Copiar detalles",
|
||||
"BackDevDetail_Copy_Ask": "¿Copiar detalles del dispositivo de la lista desplegable (se sobrescribirá todo en esta página)?",
|
||||
"Maintenance_Title" : "Herramientas de mantenimiento",
|
||||
"Maintenance_version" : "Actualizaciones de la aplicación",
|
||||
"Maintenance_new_version" : "🆕 Una nueva versión está disponible. Comprueba las <a href=\"https://github.com/jokob-sk/Pi.Alert/releases\" target=\"_blank\">notas de lanzamiento</a>.",
|
||||
"Maintenance_current_version" : "No hay actualizaciones disponibles. Comprueba en que <a href=\"https://github.com/jokob-sk/Pi.Alert/issues/138\" target=\"_blank\">se está trabajando</a>.",
|
||||
"Maintenance_built_on" : "Creada",
|
||||
"Maintenance_database_path" : "Ruta de la base de datos:",
|
||||
"Maintenance_database_size" : "Tamaño de base de datos:",
|
||||
"Maintenance_database_lastmod" : "Última modificación:",
|
||||
"Maintenance_database_backup" : "Copias de seguridad de la BD:",
|
||||
"Maintenance_database_backup_found" : "copia(s) de seguridad encontrada(s)",
|
||||
"Maintenance_database_backup_total" : "Uso total de disco",
|
||||
"Maintenance_arp_status" : "Estado de escaneo:",
|
||||
"Maintenance_arp_status_off" : "está actualmente deshabilitado",
|
||||
"Maintenance_arp_status_on" : "escaneo(s) actualmente en ejecución",
|
||||
"Maintenance_themeselector_lable" : "Seleccionar tema",
|
||||
"Maintenance_themeselector_empty" : "Elige un tema",
|
||||
"Maintenance_themeselector_apply" : "Aplicar",
|
||||
"Maintenance_themeselector_text" : "El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.",
|
||||
"Maintenance_lang_selector_lable" : "Seleccione su idioma",
|
||||
"Maintenance_lang_selector_empty" : "Elija un idioma",
|
||||
"Maintenance_lang_en_us" : "English (US)",
|
||||
"Maintenance_lang_de_de" : "German (DE)",
|
||||
"Maintenance_lang_es_es" : "Spanish (ES)",
|
||||
"Maintenance_lang_selector_text" : "El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.",
|
||||
"Maintenance_lang_selector_apply" : "Aplicar",
|
||||
"Maintenance_Status" : "Estado",
|
||||
"Maintenance_Tools_Tab_Settings" : "Ajustes",
|
||||
"Maintenance_Tools_Tab_UISettings" : "Ajustes de interfaz",
|
||||
"Maintenance_Tools_Tab_Tools" : "Herramientas",
|
||||
"Maintenance_Tools_Tab_BackupRestore" : "Respaldo / Restaurar",
|
||||
"Maintenance_Tools_Tab_Logging" : "Registros",
|
||||
"Maintenance_Tool_displayed_columns_text" : "Cambia la visibilidad y el orden de las columnas en la página <a href=\"devices.php\"><b> <i class=\"fa fa-laptop\"></i> Dispositivos</b></a> . (La función de coger y arrastrar funciona un poco mal, pero funciona. (Se intentó arreglar <a href=\"https://github.com/jokob-sk/Pi.Alert/commit/94b32f0f7332879f5a7d2af05dafa2e5d5cfa5da\">como por 3 horas</a> - se agradecerían PRs para arreglarlo)).",
|
||||
"Maintenance_Tool_order_columns_text" : "",
|
||||
"Maintenance_Tool_darkmode" : "Cambiar Modo (Dark/Light)",
|
||||
"Maintenance_Tool_drag_me" : "Coger para rearrastrar columnas.",
|
||||
"Maintenance_Tool_check_visible" : "Desactivar para ocultar columna.",
|
||||
"Maintenance_Tool_darkmode_text" : "Alternar entre el modo oscuro y el modo de luz. Si el interruptor no funciona correctamente, intente borrar el caché del navegador. El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.",
|
||||
"Maintenance_Tool_darkmode_noti" : "Cambiar Modo",
|
||||
"Maintenance_Tool_darkmode_noti_text" : "Después del cambio de tema, la página intenta volver a cargar para activar el cambio. Si es necesario, el caché debe ser eliminado.",
|
||||
"Maintenance_Tool_arpscansw" : "Activar arp-scan (on/off)",
|
||||
"Maintenance_Tool_arpscansw_text" : "Encender o desactivar el arp-scan. Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente. Los escaneos activos no se cancelan.",
|
||||
"Maintenance_Tool_arpscansw_noti" : "Activar arp-scan on or off",
|
||||
"Maintenance_Tool_arpscansw_noti_text" : "Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente.",
|
||||
"Maintenance_Tool_del_empty_macs" : "Eliminar dispositivos con MACs vacíos",
|
||||
"Maintenance_Tool_del_empty_macs_text" : "Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos sin Mac se eliminarán de la base de datos.",
|
||||
"Maintenance_Tool_del_empty_macs_noti" : "Eliminar dispositivos",
|
||||
"Maintenance_Tool_del_empty_macs_noti_text" : "¿Estás seguro de que quieres eliminar todos los dispositivos con direcciones MAC vacías? <br> (tal vez prefiera archivarlo)",
|
||||
"Maintenance_Tool_upgrade_database_noti" : "Actualizar la base de datos",
|
||||
"Maintenance_Tool_upgrade_database_text" : "Este botón actualizará la base de datos para habilitar la actividad de la red en las últimas 12 horas. Haga una copia de seguridad de su base de datos en caso de problemas.",
|
||||
"Maintenance_Tool_upgrade_database_noti_text" : "¿Estás seguro de que quieres actualizar la base de datos? <br> (tal vez prefieras archivarla)",
|
||||
"Maintenance_Tool_del_alldev" : "Eliminar todos los dispositivos",
|
||||
"Maintenance_Tool_del_alldev_text" : "Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos se eliminarán de la base de datos.",
|
||||
"Maintenance_Tool_del_alldev_noti" : "Eliminar dispositivos",
|
||||
"Maintenance_Tool_del_alldev_noti_text" : "¿Estás seguro de que quieres eliminar todos los dispositivos?",
|
||||
"Maintenance_Tool_del_unknowndev" : "Eliminar dispositivos (desconocidos)",
|
||||
"Maintenance_Tool_del_unknowndev_text" : "Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos nombrados (desconocidos) se eliminarán de la base de datos.",
|
||||
"Maintenance_Tool_del_unknowndev_noti" : "Eliminar dispositivos (desconocidos)",
|
||||
"Maintenance_Tool_del_unknowndev_noti_text" : "¿Estás seguro de que quieres eliminar todos los dispositivos (desconocidos)?",
|
||||
"Maintenance_Tool_del_allevents" : "Eliminar todo (Restablecer historial)",
|
||||
"Maintenance_Tool_del_allevents_text" : "Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Se eliminarán todos los eventos en la base de datos. En ese momento se restablecerá la presencia de todos los dispositivos. Esto puede conducir a sesiones no válidas. Esto significa que los dispositivos se muestran como \"presentes\", aunque están fuera de línea. Un escaneo mientras el dispositivo en cuestión está en línea resuelve el problema.",
|
||||
"Maintenance_Tool_del_allevents_noti" : "Eliminar eventos",
|
||||
"Maintenance_Tool_del_allevents_noti_text" : "¿Estás seguro de que quieres eliminar todos los eventos? Esto restablece la presencia de todos los dispositivos.",
|
||||
"Maintenance_Tool_del_allevents30" : "Eliminar eventos antiguos (30 días)",
|
||||
"Maintenance_Tool_del_allevents30_text" : "Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Se eliminarán todos los eventos mayores a 30 días en la base de datos. En ese momento se restablecerá la presencia de todos los dispositivos. Esto puede conducir a sesiones no válidas. Esto significa que los dispositivos se muestran como \"presentes\", aunque están fuera de línea. Un escaneo mientras el dispositivo en cuestión está en línea resuelve el problema.",
|
||||
"Maintenance_Tool_del_allevents30_noti" : "Eliminar eventos",
|
||||
"Maintenance_Tool_del_allevents30_noti_text" : "¿Está seguro de eliminar todos los eventos mayores a 30 días? Esto restablece la presencia de todos los dispositivos.",
|
||||
"Maintenance_Tool_backup" : "Respaldar DB",
|
||||
"Maintenance_Tool_backup_text" : "Las copias de seguridad de la base de datos se encuentran en el directorio de la base de datos como una Zip-Archive, nombrada con la fecha de creación. No hay un número máximo de copias de seguridad.",
|
||||
"Maintenance_Tool_backup_noti" : "Respaldar DB",
|
||||
"Maintenance_Tool_backup_noti_text" : "¿Estás seguro de que quieres exactos la copia de seguridad de DB? Asegúrese de que ningún escaneo se esté ejecutando actualmente.",
|
||||
"Maintenance_Tool_restore" : "Restaurar DB",
|
||||
"Maintenance_Tool_restore_text" : "La última copia de seguridad se puede restaurar a través del botón, pero las copias de seguridad anteriores solo se pueden restaurar manualmente. Después de la restauración, realice una verificación de integridad en la base de datos por seguridad, en caso de que el DB estuviera actualmente en acceso de escritura cuando se creó la copia de seguridad.",
|
||||
"Maintenance_Tool_restore_noti" : "Restaurar DB",
|
||||
"Maintenance_Tool_restore_noti_text" : "¿Estás seguro de que quieres hacer exactos la restauración de DB? Asegúrese de que ningún escaneo se esté ejecutando actualmente.",
|
||||
"Maintenance_Tool_purgebackup" : "Purgar Respaldos",
|
||||
"Maintenance_Tool_purgebackup_text" : "Todas las copias de seguridad serán eliminadas, excepto las 3 últimas.",
|
||||
"Maintenance_Tool_purgebackup_noti" : "Purgar Respaldos",
|
||||
"Maintenance_Tool_purgebackup_noti_text" : "¿Está seguro de borrar todas las copias de seguridad excepto las 3 últimas?",
|
||||
"Maintenance_Tool_del_ActHistory" : "Eliminar la actividad de la red",
|
||||
"Maintenance_Tool_del_ActHistory_text" : "El gráfico de actividad de la red se resetea. Esto no afecta a los eventos.",
|
||||
"Maintenance_Tool_del_ActHistory_noti" : "Borrar la actividad de la red",
|
||||
"Maintenance_Tool_del_ActHistory_noti_text" : "¿Está seguro de restablecer la actividad de la red?",
|
||||
"Maintenance_Tool_ExportCSV" : "Exportación CSV",
|
||||
"Maintenance_Tool_ExportCSV_text" : "Generar un archivo CSV (valores separados por comas) que contenga la lista de dispositivos incluyendo las relaciones de red entre los nodos de red y los dispositivos conectados.",
|
||||
"Maintenance_Tool_ExportCSV_noti" : "Exportación CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti_text" : "¿Está seguro de que quiere generar un archivo CSV?",
|
||||
"Maintenance_Tool_ImportCSV" : "Importación CSV",
|
||||
"Maintenance_Tool_ImportCSV_text" : "Antes de usar esta función, haga una copia de seguridad. Importe un archivo CSV (valor separado por comas) que contiene la lista de dispositivos, incluidas las relaciones de red entre nodos de red y dispositivos conectados. Para hacer eso, coloque el archivo CSV llamado <b> devices.csv </b> en su carpeta <b>/config </b>.",
|
||||
"Maintenance_Tool_ImportCSV_noti" : "Importación CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti_text" : "¿Está seguro de que quiere importar el archivo CSV? Esto sobrescribirá completamente los dispositivos de su base de datos.",
|
||||
"BackDevices_Arpscan_disabled" : "Arp-Scan Desactivado",
|
||||
"BackDevices_Arpscan_enabled" : "Arp-Scan Activado",
|
||||
"BackDevices_darkmode_disabled" : "Darkmode Desactivado",
|
||||
"BackDevices_darkmode_enabled" : "Darkmode Activado",
|
||||
"BackDevices_Restore_CopError" : "La base de datos original no se pudo guardar.",
|
||||
"BackDevices_Restore_okay" : "Restauración ejecutado con éxito.",
|
||||
"BackDevices_Restore_Failed" : "La restauración falló. Restaurar la copia de seguridad manualmente.",
|
||||
"BackDevices_Backup_CopError" : "La base de datos original no se pudo guardar.",
|
||||
"BackDevices_Backup_okay" : "La copia de seguridad ejecutada con éxito con el nuevo archivo",
|
||||
"BackDevices_Backup_Failed" : "La copia de seguridad se ejecutó parcialmente con éxito. El archivo no se puede crear o está vacío.",
|
||||
"BackDevices_DBTools_DelDev_a" : "Dispositivo eliminado con éxito",
|
||||
"BackDevices_DBTools_DelDev_b" : "Dispositivos eliminados con éxito",
|
||||
"BackDevices_DBTools_DelEvents" : "Eventos eliminados con éxito",
|
||||
"BackDevices_DBTools_DelEventsError" : "Error de eliminación de eventos",
|
||||
"BackDevices_DBTools_DelDevError_a" : "Error de eliminación del dispositivo",
|
||||
"BackDevices_DBTools_DelDevError_b" : "Error de eliminación de dispositivos",
|
||||
"BackDevices_DBTools_UpdDev" : "Dispositivo actualizado con éxito",
|
||||
"BackDevices_DBTools_UpdDevError" : "Error al actualizar el dispositivo",
|
||||
"BackDevices_DBTools_Upgrade" : "Base de datos actualizada correctamente",
|
||||
"BackDevices_DBTools_UpgradeError" : "Falló la actualización de la base de datos",
|
||||
"BackDevices_DBTools_Purge" : "Las copias de seguridad más antiguas fueron eliminadas",
|
||||
"BackDevices_DBTools_ImportCSV" : "Los dispositivos del archivo CSV han sido importados correctamente.",
|
||||
"BackDevices_DBTools_ImportCSVError" : "El archivo CSV no pudo ser importado. Asegúrate de que el formato es correcto.",
|
||||
"BackDevices_DBTools_ImportCSVMissing" : "El archivo CSV no se pudo encontrar en <b>/config/devices.csv.</b>",
|
||||
"BackDevices_Device_UpdDevError" : "Fallo al actualizar dispositivos, pruebe de nuevo más tarde. La base de datos probablemente esté bloqueada por una tarea en curso.",
|
||||
"Network_Title" : "Descripción general de la red",
|
||||
"Network_ManageDevices" : "Administrar dispositivos",
|
||||
"Network_ManageAdd" : "Añadir dispositivo",
|
||||
"Network_ManageAssign" : "Asignar",
|
||||
"Network_ManageUnassign" : "Desasignar",
|
||||
"Network_ManageEdit" : "Actualizar dispositivo",
|
||||
"Network_ManageDel" : "Eliminar dispositivo",
|
||||
"Network_ManageAdd_Name" : "Nombre del dispositivo",
|
||||
"Network_ManageAdd_Name_text" : "Nombre sin caracteres especiales",
|
||||
"Network_ManageAdd_Type" : "Tipo de dispositivo",
|
||||
"Network_ManageAdd_Type_text" : "-- Seleccionar tipo --",
|
||||
"Network_ManageAdd_Port" : "Recuento de puertos",
|
||||
"Network_ManageAdd_Port_text" : "dejar en blanco para WiFi y Powerline",
|
||||
"Network_ManageAdd_Submit" : "Añadir dispositivo",
|
||||
"Network_ManageEdit_ID" : "Dispositivo para actualizar",
|
||||
"Network_ManageEdit_ID_text" : "-- Seleccione el dispositivo para editar --",
|
||||
"Network_ManageEdit_Name" : "Nuevo nombre del dispositivo",
|
||||
"Network_ManageEdit_Name_text" : "Nombre sin caracteres especiales",
|
||||
"Network_ManageEdit_Type" : "Nuevo tipo de dispositivo",
|
||||
"Network_ManageEdit_Type_text" : "-- Seleccione tipo --",
|
||||
"Network_ManageEdit_Port" : " Nuevo recuento de puertos",
|
||||
"Network_ManageEdit_Port_text" : "Dejar en blanco para WiFi y Powerline",
|
||||
"Network_ManageEdit_Submit" : "Guardar los cambios",
|
||||
"Network_ManageDel_Name" : "Dispositivo para eliminar",
|
||||
"Network_ManageDel_Name_text" : "-- Seleccione el dispositivo --",
|
||||
"Network_ManageDel_Submit" : "Eliminar",
|
||||
"Network_Table_State" : "Estado",
|
||||
"Network_Table_Hostname" : "Nombre de host",
|
||||
"Network_Table_IP" : "Dirección IP",
|
||||
"Network_UnassignedDevices" : "Dispositivos sin asignar",
|
||||
"Network_Assign" : "Conectar al nodo de <i class=\"fa fa-server\"></i> red",
|
||||
"Network_Connected" : "Dispositivos conectados",
|
||||
"Network_ManageLeaf" : "Gestionar asignación",
|
||||
"Network_Node" : "Nodo de red",
|
||||
"Network_Node_Name" : "Nombre de nodo",
|
||||
"Network_Parent" : "Dispositivo primario de la red",
|
||||
"Network_NoAssignedDevices" : "Este nodo de red no tiene asignado ningún dispositivo (nodo externo). Asigna uno de la lista o ve a la pestaña <b><i class=\"fa fa-info-circle\"></i> Detalles</b> de cualquier dispositivo en la página<a href=\"devices.php\"><b> <i class=\"fa fa-laptop\"></i> Dispositivos</b></a>, y asígnalo a un <b><i class=\"fa fa-server\"></i> Nodo (MAC)</b> <b><i class=\"fa fa-ethernet\"></i> Puerto</b> de la red ahí.",
|
||||
"HelpFAQ_Title" : "Ayuda / FAQ",
|
||||
"HelpFAQ_Cat_General" : "General",
|
||||
"HelpFAQ_Cat_Detail" : "Detalles",
|
||||
"HelpFAQ_Cat_General_100_head" : "El reloj en la parte superior derecha y el tiempo de los eventos/presencia no son correctos (diferencia de tiempo).",
|
||||
"HelpFAQ_Cat_General_100_text_a" : "En su PC, la siguiente zona horaria está configurada para el entorno PHP:",
|
||||
"HelpFAQ_Cat_General_100_text_b" : "Si esta no es la zona horaria en la que se encuentra, debe cambiar la zona horaria en el archivo de configuración de PHP. Puedes encontrarlo en este directorio:",
|
||||
"HelpFAQ_Cat_General_100_text_c" : "Busque en este archivo la entrada \"date.timezone\", elimine el \";\" inicial si es necesario e introduzca la zona horaria deseada. Puede encontrar una lista con las zonas horarias compatibles aquí (<a href=\"https://www.php.net/manual/en/timezones.php\" target=\"blank\">Link</a>)",
|
||||
"HelpFAQ_Cat_General_101_head" : "Mi red parece ralentizarse, el streaming se \"congela\".",
|
||||
"HelpFAQ_Cat_General_101_text" : "Es muy posible que los dispositivos de baja potencia alcancen sus límites de rendimiento con la forma en que Pi.Alert detecta nuevos dispositivos en la red. Esto se amplifica aún más, si estos dispositivos se comunican con la red a través de WLAN. Las soluciones aquí serían cambiar a una conexión por cable si es posible o, si el dispositivo sólo se va a utilizar durante un período de tiempo limitado, utilizar el arp scan. pausar el arp scan en la página de mantenimiento.",
|
||||
"HelpFAQ_Cat_General_102_head" : "Me aparece el mensaje de que la base de datos es de sólo de lectura.",
|
||||
"HelpFAQ_Cat_General_102_text" : "Compruebe en el directorio Pi.Alert si la carpeta de la base de datos (db) tiene asignados los permisos correctos:<br> <span class=\"text-danger help_faq_code\">drwxrwx--- 2 (nombre de usuario) www-data</span><br> Si el permiso no es correcto, puede establecerlo de nuevo con los siguientes comandos en la terminal o la consola:<br> <span class=\"text-danger help_faq_code\"> sudo chgrp -R www-data ~/pialert/db<br> chmod -R 770 ~/pialert/db </span><br> Si la base de datos sigue siendo de sólo lectura, intente reinstalar o restaurar una copia de seguridad de la base de datos desde la página de mantenimiento.",
|
||||
"HelpFAQ_Cat_General_102docker_head" : "(🐳 Solo Docker) Problemas con la base de datos (errores de AJAX, solo lectura, no encontrado)",
|
||||
"HelpFAQ_Cat_General_102docker_text" : "Comprueba que has seguido las instrucciones del <a href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles\">dockerfile (la información más actualizada)</a>. <br/> <br/> <ul data-sourcepos=\"49:4-52:146\" dir=\"auto\"> <li data-sourcepos=\"49:4-49:106\">Descarga la <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db\">base de datos original desde GitHub</a>.</li> <li data-sourcepos=\"50:4-50:195\">Mapea el archivo <code>pialert.db</code> (<g-emoji class=\"g-emoji\" alias=\"warning\" fallback-src=\"https://github.githubassets.com/images/icons/emoji/unicode/26a0.png\">⚠</g-emoji> no carpeta) de arriba a <code>/home/pi/pialert/db/pialert.db</code> (puedes comprobar los <a href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples\">ejemplos</a> para más detalles).</li> <li data-sourcepos=\"51:4-51:161\">Si aparecen problemas (errores de AJAX, no se puede escribir a la base de datos, etc,) asegúrate que los permisos están establecidos correctamente. También puedes comprobar los registros en <code>/home/pi/pialert/front/log</code>.</li> <li data-sourcepos=\"52:4-52:146\">Para arreglar los problemas de los permisos, puedes probar a crear una copia de seguridad de la base de datos y después restaurarla desde la sección <strong>Mantenimiento > Copia de seguridad/Restaurar</strong>.</li> <li data-sourcepos=\"53:4-53:228\">Si la base de datos está en modo solo lectura, lo puedes arreglar ejecutando el siguiente comando para establecer el propietario y grupo en el sistema host: <code>docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db</code>.</li> </ul>",
|
||||
"HelpFAQ_Cat_General_103_head" : "La página de inicio de sesión no aparece, incluso después de cambiar la contraseña.",
|
||||
"HelpFAQ_Cat_General_103_text" : "Además de la contraseña, el archivo de configuración debe contener <span class=\"text-danger help_faq_code\">~/pialert/config/pialert.conf</span> además el parámetro <span class=\"text-danger help_faq_code\">PIALERT_WEB_PROTECTION</span> debe ajustarse a <span class=\"text-danger help_faq_code\">True</span>.",
|
||||
"HelpFAQ_Cat_Device_200_head" : "Tengo dispositivos en mi lista que no conozco. Después de borrarlos, siempre vuelven a aparecer.",
|
||||
"HelpFAQ_Cat_Device_200_text" : "Si utiliza Pi-hole, tenga en cuenta que Pi.Alert recupera información de Pi-hole. Ponga en pausa Pi.Alert, vaya a la página de configuración de Pi-hole y elimine la concesión DHCP si es necesario. Luego, también en Pi-hole, revise en Herramientas -> Red para ver si puede encontrar los hosts recurrentes allí. Si es así, elimínelos también allí. Ahora puede volver a iniciar Pi.Alert. Ahora el dispositivo(s) no debería aparecer más.",
|
||||
"HelpFAQ_Cat_Detail_300_head" : "¿Qué significa? ",
|
||||
"HelpFAQ_Cat_Detail_300_text_a" : "significa un dispositivo de red creado a partir de la página de red.",
|
||||
"HelpFAQ_Cat_Detail_300_text_b" : "designa el número de puerto en el que el dispositivo editado actualmente está conectado a este dispositivo de red.",
|
||||
"HelpFAQ_Cat_Detail_301_head_a" : "¿Cuándo está escaneando ahora? En ",
|
||||
"HelpFAQ_Cat_Detail_301_head_b" : " dice 1min pero el gráfico muestra intervalos de 5min.",
|
||||
"HelpFAQ_Cat_Detail_301_text" : "El intervalo de tiempo entre los escaneos está definido por el \"Cronjob\", que está configurado en 5 minutos de forma predeterminada. La designación \"1min\" se refiere a la duración esperada del escaneo. Dependiendo de la configuración de la red, este tiempo puede variar. Para editar el cronjob, puede utilizar el siguiente comando en la terminal/consola <span class=\"text-danger help_faq_code\">crontab -e</span> y cambiar el intervalo.",
|
||||
"HelpFAQ_Cat_Detail_302_head_a" : "¿Qué significa? ",
|
||||
"HelpFAQ_Cat_Detail_302_head_b" : "¿y por qué no puedo seleccionarlo?",
|
||||
"HelpFAQ_Cat_Detail_302_text" : "Algunos dispositivos modernos generan direcciones MAC aleatorias por razones de privacidad, que ya no pueden asociarse a ningún fabricante y que vuelven a cambiar con cada nueva conexión. Pi.Alert detecta si se trata de una dirección MAC aleatoria y activa este \"campo\" automáticamente. Para deshabilitar este comportamiento, debe buscar en su dispositivo cómo deshabilitar la aleatorización de direcciones MAC.",
|
||||
"HelpFAQ_Cat_Detail_303_head" : "¿Qué es Nmap y para qué sirve?",
|
||||
"HelpFAQ_Cat_Detail_303_text" : "Nmap es un escáner de red con múltiples capacidades.<br> Cuando aparece un nuevo dispositivo en su lista, tiene la posibilidad de obtener información más detallada sobre el dispositivo a través del escaneo de Nmap.",
|
||||
"HelpFAQ_Cat_Presence_400_head" : "Los dispositivos se muestran con un marcador amarillo y la nota \"evento faltante\".",
|
||||
"HelpFAQ_Cat_Presence_400_text" : "Si esto sucede, tiene la opción de eliminar los eventos en el dispositivo en cuestión (vista de detalles). Otra posibilidad sería encender el dispositivo y esperar hasta que Pi.Alert detecte el dispositivo como \"online\" con el siguiente escaneo y luego simplemente apagar el dispositivo nuevamente. Ahora Pi.Alert debería anotar correctamente el estado del dispositivo en la base de datos con el próximo escaneo.",
|
||||
"HelpFAQ_Cat_Presence_401_head" : "Un dispositivo se muestra como presente aunque esté \"Offline\".",
|
||||
"HelpFAQ_Cat_Presence_401_text" : "Si esto sucede, tiene la posibilidad de eliminar los eventos del dispositivo en cuestión (vista de detalles). Otra posibilidad sería encender el dispositivo y esperar hasta que Pi.Alert reconozca el dispositivo como \"online\" con el siguiente escaneo y luego simplemente apagar el dispositivo nuevamente. Ahora Pi.Alert debería anotar correctamente el estado del dispositivo en la base de datos con el próximo escaneo.",
|
||||
"HelpFAQ_Cat_Network_600_head" : "¿Para qué sirve esta sección?",
|
||||
"HelpFAQ_Cat_Network_600_text" : "Esta sección debería ofrecerle la posibilidad de mapear la asignación de sus dispositivos de red. Para ello, puede crear uno o más conmutadores, WLAN, enrutadores, etc., proporcionarles un número de puerto si es necesario y asignarles dispositivos ya detectados. Esta asignación se realiza en la vista detallada del dispositivo a asignar. Por lo tanto, es posible determinar rápidamente a qué puerto está conectado un host y si está en línea. Es posible asignar un dispositivo a múltiples puertos (agrupación de puertos), así como múltiples dispositivos a un puerto (máquinas virtuales).",
|
||||
"HelpFAQ_Cat_Network_601_head" : "¿Hay otros documentos?",
|
||||
"HelpFAQ_Cat_Network_601_text" : "¡Sí, los hay! Marque <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/\">todos los documentos</a> para más información.",
|
||||
"test_event_tooltip" : "Guarda tus cambios antes de probar nuevos ajustes.",
|
||||
"test_event_icon" : "fa-vial-circle-check",
|
||||
"run_event_tooltip" : "Activa el ajuste y guarda tus cambios antes de ejecutarlo.",
|
||||
"run_event_icon" : "fa-play",
|
||||
"general_event_title" : "Ejecutar un evento ad-hoc",
|
||||
"general_event_description" : "El evento que has ejecutado puede tardar un rato mientras finalizan procesos en segundo plano. La ejecución ha terminado cuando ves <code>finalizado</code> abajo. Comprueba el <a href='/maintenance.php#tab_Logging'>registro de error</a> si no has obtenido el resultado esperado. <br/> <br/> Estado: ",
|
||||
"Plugins_Unprocessed_Events" : "Eventos sin procesar",
|
||||
"Plugins_Objects" : "Objetos del Plugin",
|
||||
"Plugins_DeleteAll" : "Eliminar todo (se ignoran los filtros)",
|
||||
"Plugins_History" : "Historial de eventos",
|
||||
"Plugins_Filters_Mac" : "Filtro MAC",
|
||||
"Plugins_Out_of" : "de",
|
||||
"Settings_Title" : "<i class=\"fa fa-cog\"> Configuración</i>",
|
||||
"settings_missing" : "Actualiza la página, no todos los ajustes se han cargado. Probablemente sea por una sobrecarga de la base de datos.",
|
||||
"settings_missing_block" : "No puedes guardar los ajustes sin establecer todas las claves. Actualiza la página. Problabmente esté causado por una sobrecarga de la base de datos.",
|
||||
"settings_old" : "N/A",
|
||||
"settings_imported" : "Última vez que los ajustes fueron importados desde el archivo pialert.conf:",
|
||||
"settings_expand_all" : "Expandir todo",
|
||||
"Setting_Override" : "Sobreescribir el valor",
|
||||
"Setting_Override_Description": "Habilitar esta opción anulará un valor predeterminado proporcionado por la aplicación con el valor especificado anteriormente.",
|
||||
"General_display_name" : "General",
|
||||
"General_icon" : "<i class=\"fa fa-gears\"></i>",
|
||||
"SCAN_SUBNETS_name" : "Subredes para escanear",
|
||||
"SCAN_SUBNETS_description" : "El escaneo Arp es una herramienta de la línea de comandos que usa el protocolo ARP para encontrar e identificar la ip de los dispositivos. Una alternativa a este escaneo sería activar los ajustes de la <a onclick=\"toggleAllSettings()\" href=\"#PIHOLE_RUN\"><code>PIHOLE_RUN</code>integración con PiHole</a>. El tiempo del escaneo ARP depende del número de ips a comprobar, así que es importante establecer correctamente la máscara y la interfaz de red. Comprueba la <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md\" target=\"_blank\">documentación sobre sudredes</a> para obtener ayuda para establecer VLANs, cuáles son soportadas o como averiguar la máscara y la interfaz de red.",
|
||||
"LOG_LEVEL_name" : "Imprimir registros adicionales",
|
||||
"LOG_LEVEL_description" : "Esto hará que el registro tenga más información. Util para depurar que eventos se van guardando en la base de datos.",
|
||||
"TIMEZONE_name" : "Zona horaria",
|
||||
"TIMEZONE_description" : "La zona horaria para mostrar las estadísticas correctamente. Encuentra tu zona horaria <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" rel=\"nofollow\">aquí</a>.",
|
||||
"ENABLE_PLUGINS_name" : "Habilitar complementos",
|
||||
"ENABLE_PLUGINS_description" : "Habilita la funcionalidad de los <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins\">complementos</a>. Cargar los complementos requiere más recursos de hardware, así que quizás quieras desactivarlo en hardware poco potente.",
|
||||
"PLUGINS_KEEP_HIST_name": "Historial de complementos",
|
||||
"PLUGINS_KEEP_HIST_description": "¿Cuántas entradas de los resultados del análisis del historial de complementos deben conservarse (globalmente, no específico del dispositivo!).",
|
||||
"PIALERT_WEB_PROTECTION_name" : "Habilitar inicio de sesión",
|
||||
"PIALERT_WEB_PROTECTION_description" : "Cuando está habilitado, se muestra un cuadro de diálogo de inicio de sesión. Lea detenidamente a continuación si se le bloquea el acceso a su instancia.",
|
||||
"PIALERT_WEB_PASSWORD_name" : "Contraseña de inicio de sesión",
|
||||
"PIALERT_WEB_PASSWORD_description" : "La contraseña predeterminada es <code>123456</code>. Para cambiar la contraseña, ejecute <code>/home/pi/pialert/back/pialert-cli</code> en el contenedor",
|
||||
"INCLUDED_SECTIONS_name" : "Notificar en",
|
||||
"INCLUDED_SECTIONS_description" : "Especifica que eventos envían notificaciones. Elimina los tipos de eventos de los que no quieras recibir notificaciones. Este ajuste sobreescribe los ajustes específicos de los dispositivos en la interfaz. (<code>CTRL + Clic</code> para seleccionar / deseleccionar).",
|
||||
"DAYS_TO_KEEP_EVENTS_name" : "Eliminar eventos anteriores a",
|
||||
"DAYS_TO_KEEP_EVENTS_description" : "Esta es una configuración de mantenimiento. Esto especifica el número de días de entradas de eventos que se guardarán. Todos los eventos anteriores se eliminarán periódicamente.",
|
||||
"HRS_TO_KEEP_NEWDEV_name": "Guardar nuevos dispositivos para",
|
||||
"HRS_TO_KEEP_NEWDEV_description": "Esta es una configuración de mantenimiento. Si está habilitado (<code>0</code> está deshabilitado), los dispositivos marcados como <b>Nuevo dispositivo</b> se eliminarán si su <b>Primera sesión</ b> el tiempo era anterior a las horas especificadas en esta configuración. Utilice esta configuración si desea eliminar automáticamente <b>Nuevos dispositivos</b> después de <code>X</code> horas.",
|
||||
"REPORT_DASHBOARD_URL_name" : "URL de Pi.Alert",
|
||||
"REPORT_DASHBOARD_URL_description" : "Esta URL se utiliza como base para generar enlaces en los correos electrónicos. Ingrese la URL completa que comienza con <code>http://</code>, incluido el número de puerto (sin barra inclinada al final <code>/</code>).",
|
||||
"DIG_GET_IP_ARG_name" : "Descubrir de IP de Internet",
|
||||
"DIG_GET_IP_ARG_description" : "Cambie los argumentos de la <a href=\"https://linux.die.net/man/1/dig\" target=\"_blank\">utilidad de dig</a> si tiene problemas para resolver su IP de Internet. Los argumentos se agregan al final del siguiente comando: <code>dig +short </code>.",
|
||||
"UI_LANG_name" : "Idioma de interfaz",
|
||||
"UI_LANG_description" : "Seleccione el idioma de interfaz de usuario preferido.",
|
||||
"UI_PRESENCE_name" : "Mostrar en el gráfico de presencia",
|
||||
"UI_PRESENCE_description" : "Elige que estados del dispositivo deben mostrarse en la gráfica de <b>Presencia del dispositivo a lo largo del tiempo</b> de la página de <a href=\"/devices.php\" target=\"_blank\">Dispositivos</a>. (<code>CTRL + Clic</code> para seleccionar / deseleccionar)",
|
||||
"Email_display_name" : "Email",
|
||||
"Email_icon" : "<i class=\"fa fa-at\"></i>",
|
||||
"REPORT_MAIL_name" : "Habilitar email",
|
||||
"REPORT_MAIL_description" : "Si está habilitado, se envía un correo electrónico con una lista de cambios a los que se ha suscrito. Complete también todas las configuraciones restantes relacionadas con la configuración de SMTP a continuación",
|
||||
"SMTP_SERVER_name" : "URL del servidor SMTP",
|
||||
"SMTP_SERVER_description" : "La URL del host del servidor SMTP. Por ejemplo, <code>smtp-relay.sendinblue.com</code>. Para utilizar Gmail como servidor SMTP <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SMTP.md\">siga esta guía</a >",
|
||||
"SMTP_PORT_name" : "Puerto del servidor SMTP",
|
||||
"SMTP_PORT_description" : "Número de puerto utilizado para la conexión SMTP. Establézcalo en <code>0</code> si no desea utilizar un puerto al conectarse al servidor SMTP.",
|
||||
"SMTP_SKIP_LOGIN_name" : "Omitir autenticación",
|
||||
"SMTP_SKIP_LOGIN_description" : "No utilice la autenticación cuando se conecte al servidor SMTP.",
|
||||
"SMTP_USER_name" : "Nombre de usuario SMTP",
|
||||
"SMTP_USER_description" : "El nombre de usuario utilizado para iniciar sesión en el servidor SMTP (a veces, una dirección de correo electrónico completa).",
|
||||
"SMTP_PASS_name" : "Contraseña de SMTP",
|
||||
"SMTP_PASS_description" : "La contraseña del servidor SMTP.",
|
||||
"SMTP_SKIP_TLS_name" : "No usar TLS",
|
||||
"SMTP_SKIP_TLS_description" : "Deshabilite TLS cuando se conecte a su servidor SMTP.",
|
||||
"SMTP_FORCE_SSL_name" : "Forzar SSL",
|
||||
"SMTP_FORCE_SSL_description" : "Forzar SSL al conectarse a su servidor SMTP",
|
||||
"SYSTEM_TITLE" : "Información del sistema",
|
||||
"REPORT_TO_name" : "Enviar el email a",
|
||||
"REPORT_TO_description" : "Dirección de correo electrónico a la que se enviará la notificación.",
|
||||
"REPORT_FROM_name" : "Asunto del email",
|
||||
"REPORT_FROM_description" : "Asunto del correo electrónico de notificación.",
|
||||
"Webhooks_display_name" : "Webhooks",
|
||||
"Webhooks_icon" : "<i class=\"fa fa-circle-nodes\"></i>",
|
||||
"REPORT_WEBHOOK_name" : "Habilitar webhooks",
|
||||
"REPORT_WEBHOOK_description" : "Habilite webhooks para notificaciones. Los webhooks lo ayudan a conectarse a muchas herramientas de terceros, como IFTTT, Zapier o <a href=\"https://n8n.io/\" target=\"_blank\">n8n</a>, por nombrar algunas. Consulte esta sencilla <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md\" target=\"_blank\">guía de n8n aquí</a> para obtener comenzó. Si está habilitado, configure los ajustes relacionados a continuación.",
|
||||
"WEBHOOK_URL_name" : "URL de destino",
|
||||
"WEBHOOK_URL_description" : "URL de destino comienza con <code>http://</code> o <code>https://</code>.",
|
||||
"WEBHOOK_PAYLOAD_name" : "Tipo de carga",
|
||||
"WEBHOOK_PAYLOAD_description" : "El formato de datos de carga de Webhook para el atributo <code>body</code> > <code>attachments</code> > <code>text</code> en el json de carga. Vea un ejemplo de la carga <a target=\"_blank\" href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json\">aquí</a>. (por ejemplo: para discord use <code>text</code>)",
|
||||
"WEBHOOK_REQUEST_METHOD_name" : "Método de solicitud",
|
||||
"WEBHOOK_REQUEST_METHOD_description" : "El método de solicitud HTTP que se utilizará para la llamada de webhook.",
|
||||
"Webhooks_settings_group" : "<i class=\"fa fa-circle-nodes\"></i> Webhooks",
|
||||
"WEBHOOK_SIZE_name": "Tamaño máximo de carga útil",
|
||||
"WEBHOOK_SIZE_description": "El tamaño máximo de la carga útil del webhook como número de caracteres en la cadena pasada. Si supera el límite, se truncará y se agregará un mensaje <code>(text was truncated)</code>.",
|
||||
"Apprise_display_name" : "Apprise",
|
||||
"Apprise_icon" : "<i class=\"fa fa-bullhorn\"></i>",
|
||||
"REPORT_APPRISE_name" : "Habilitar Apprise",
|
||||
"REPORT_APPRISE_description" : "Habilitar el envío de notificaciones a través de <a target=\"_blank\" href=\"https://hub.docker.com/r/caronc/apprise\">Apprise</a>.",
|
||||
"APPRISE_HOST_description" : "URL del host de Apprise que comienza con <code>http://</code> o <code>https://</code>. (no olvide incluir <code>/notify</code> al final)",
|
||||
"APPRISE_HOST_name" : "URL del host de Apprise",
|
||||
"APPRISE_URL_name" : "URL de notificación de Apprise",
|
||||
"APPRISE_URL_description" : "Informar de la URL de destino de la notificación. Por ejemplo, para Telegram sería <code>tgram://{bot_token}/{chat_id}</code>.",
|
||||
"APPRISE_SIZE_name": "Tamaño máximo de carga útil",
|
||||
"APPRISE_SIZE_description": "El tamaño máximo de la carga útil de información como número de caracteres en la cadena pasada. Si supera el límite, se truncará y se agregará un mensaje <code>(text was truncated)</code>.",
|
||||
"NTFY_display_name" : "NTFY",
|
||||
"NTFY_icon" : "<i class=\"fa fa-terminal\"></i>",
|
||||
"REPORT_NTFY_name" : "Habilitar NTFY",
|
||||
"REPORT_NTFY_description" : "Habilitar el envío de notificaciones a través de <a target=\"_blank\" href=\"https://ntfy.sh/\">NTFY</a>.",
|
||||
"NTFY_HOST_name" : "URL del host NTFY",
|
||||
"NTFY_HOST_description" : "URL de host NTFY que comienza con <code>http://</code> o <code>https://</code>. Puede usar la instancia alojada en <a target=\"_blank\" href=\"https://ntfy.sh/\">https://ntfy.sh</a> simplemente ingresando <code>https://ntfy. sh</código>.",
|
||||
"NTFY_TOPIC_name" : "Tema de NTFY",
|
||||
"NTFY_TOPIC_description" : "Tu tema secreto.",
|
||||
"NTFY_USER_name" : "Usuario de NTFY",
|
||||
"NTFY_USER_description" : "Ingrese usuario si necesita (alojar) una instancia con autenticación habilitada.",
|
||||
"NTFY_PASSWORD_name" : "Contraseña de NTFY",
|
||||
"NTFY_PASSWORD_description" : "Ingrese la contraseña si necesita (host) una instancia con autenticación habilitada.",
|
||||
"PUSHSAFER_display_name" : "Pushsafer",
|
||||
"PUSHSAFER_icon" : "<i class=\"fa fa-bell\"></i>",
|
||||
"REPORT_PUSHSAFER_name" : "Habilitar Pushsafer",
|
||||
"REPORT_PUSHSAFER_description" : "Habilitar el envío de notificaciones a través de <a target=\"_blank\" href=\"https://www.pushsafer.com/\">Pushsafer</a>.",
|
||||
"PUSHSAFER_TOKEN_name" : "Token de Pushsafer",
|
||||
"PUSHSAFER_TOKEN_description" : "Su clave secreta de la API de Pushsafer (token).",
|
||||
"APPRISE_PAYLOAD_name" : "Tipo de carga",
|
||||
"APPRISE_PAYLOAD_description" : "Seleccione el tipo de carga útil enviada a Apprise. Por ejemplo, <code>html</code> funciona bien con correos electrónicos, <code>text</code> con aplicaciones de chat, como Telegram.",
|
||||
"MQTT_display_name" : "MQTT",
|
||||
"MQTT_icon" : "<i class=\"fa fa-square-rss\"></i>",
|
||||
"REPORT_TITLE" : "Reporte",
|
||||
"REPORT_ERROR" : "La página que está buscando no está disponible temporalmente, inténtelo de nuevo después de unos segundos",
|
||||
"REPORT_MQTT_name" : "Habilitar MQTT",
|
||||
"REPORT_MQTT_description" : "Habilitar el envío de notificaciones a través de <a target=\"_blank\" href=\"https://www.home-assistant.io/integrations/mqtt/\">MQTT</a> a su Home Assistance.",
|
||||
"MQTT_BROKER_name" : "URL del broker MQTT",
|
||||
"MQTT_BROKER_description" : "URL del host MQTT (no incluya <code>http://</code> o <code>https://</code>).",
|
||||
"MQTT_PORT_name" : "Puerto del broker MQTT",
|
||||
"MQTT_PORT_description" : "Puerto donde escucha el broker MQTT. Normalmente <code>1883</code>.",
|
||||
"MQTT_USER_name" : "Usuario de MQTT",
|
||||
"MQTT_USER_description" : "Nombre de usuario utilizado para iniciar sesión en su instancia de agente de MQTT.",
|
||||
"MQTT_PASSWORD_name" : "Contraseña de MQTT",
|
||||
"MQTT_PASSWORD_description" : "Contraseña utilizada para iniciar sesión en su instancia de agente de MQTT.",
|
||||
"MQTT_QOS_name" : "Calidad de servicio MQTT",
|
||||
"MQTT_QOS_description" : "Configuración de calidad de servicio para el envío de mensajes MQTT. <code>0</code>: baja calidad a <code>2</code>: alta calidad. Cuanto mayor sea la calidad, mayor será el retraso.",
|
||||
"MQTT_DELAY_SEC_name" : "Retraso de MQTT por dispositivo",
|
||||
"MQTT_DELAY_SEC_description" : "Un pequeño truco: retrase la adición a la cola en caso de que el proceso se reinicie y los procesos de publicación anteriores se anulen (se necesitan ~<code>2</code>s para actualizar la configuración de un sensor en el intermediario). Probado con <code>2</code>-<code>3</code> segundos de retraso. Este retraso solo se aplica cuando se crean dispositivos (durante el primer bucle de notificación). No afecta los escaneos o notificaciones posteriores.",
|
||||
"API_display_name" : "API",
|
||||
"API_icon" : "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
"API_CUSTOM_SQL_name" : "Endpoint personalizado",
|
||||
"API_CUSTOM_SQL_description" : "Puede especificar una consulta SQL personalizada que generará un archivo JSON y luego lo expondrá a través del <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\">archivo <code>table_custom_endpoint.json</code ></a>.",
|
||||
"Speedtest_Results" : "Resultados de la prueba de velocidad",
|
||||
"Systeminfo_General" : "General",
|
||||
"Systeminfo_General_Full_Date": "Fecha completa:",
|
||||
"Systeminfo_General_Date": "Fecha:",
|
||||
"Systeminfo_General_Date2": "Fecha2:",
|
||||
"Systeminfo_General_TimeZone": "Zona horaria:",
|
||||
"Systeminfo_This_Client": "Este cliente",
|
||||
"Systeminfo_Client_User_Agent": "Agente de usuario:",
|
||||
"Systeminfo_Client_Resolution": "Resolución del navegador:",
|
||||
"Systeminfo_CPU" : "CPU",
|
||||
"Systeminfo_CPU_Vendor": "Proveedor de CPU:",
|
||||
"Systeminfo_CPU_Name": "Nombre de la CPU:",
|
||||
"Systeminfo_CPU_Cores": "Núcleos de CPU:",
|
||||
"Systeminfo_CPU_Speed": "Velocidad de la CPU:",
|
||||
"Systeminfo_CPU_Temp": "Temperatura de la CPU:",
|
||||
"Systeminfo_Memory": "Memoria",
|
||||
"Systeminfo_Memory_Usage": "Memoria en uso:",
|
||||
"Systeminfo_Memory_Usage_Percent": "Memoria %:",
|
||||
"Systeminfo_Memory_Total_Memory": "Memoria total:",
|
||||
"Systeminfo_Motherboard" : "Placa base",
|
||||
"Systeminfo_Motherboard_BIOS": "BIOS:",
|
||||
"Systeminfo_Motherboard_BIOS_Date": "Fecha del BIOS:",
|
||||
"Systeminfo_Motherboard_BIOS_Vendor": "Proveedor de BIOS:",
|
||||
"Systeminfo_Motherboard_Manufactured": "Fabricado por:",
|
||||
"Systeminfo_Motherboard_Name": "Nombre:",
|
||||
"Systeminfo_Motherboard_Revision": "Revisión:",
|
||||
"Systeminfo_Network": "Red",
|
||||
"Systeminfo_Network_Accept_Encoding": "Codificación aceptada:",
|
||||
"Systeminfo_Network_Accept_Language": "Idioma aceptado:",
|
||||
"Systeminfo_Network_Connection_Port": "Puerto de conexión:",
|
||||
"Systeminfo_Network_HTTP_Host": "Host HTTP:",
|
||||
"Systeminfo_Network_HTTP_Referer": "Referido HTTP:",
|
||||
"Systeminfo_Network_HTTP_Referer_String": "Sin referencia HTTP",
|
||||
"Systeminfo_Network_IP": "IP Internet:",
|
||||
"Systeminfo_Network_IP_Connection": "Conexión IP:",
|
||||
"Systeminfo_Network_IP_Server": "IP del servidor:",
|
||||
"Systeminfo_Network_MIME": "MIME:",
|
||||
"Systeminfo_Network_Request_Method": "Método de solicitud:",
|
||||
"Systeminfo_Network_Request_URI": "URI de solicitud:",
|
||||
"Systeminfo_Network_Request_Time": "Hora de solicitud:",
|
||||
"Systeminfo_Network_Secure_Connection": "Conexión segura:",
|
||||
"Systeminfo_Network_Secure_Connection_String": "No (HTTP)",
|
||||
"Systeminfo_Network_Server_Name": "Nombre del servidor:",
|
||||
"Systeminfo_Network_Server_Name_String": "Nombre del servidor no encontrado",
|
||||
"Systeminfo_Network_Server_Query": "Consulta del servidor:",
|
||||
"Systeminfo_Network_Server_Query_String": "Sin cadena de consulta",
|
||||
"Systeminfo_Network_Server_Version": "Versión del servidor:",
|
||||
"Systeminfo_Network_Hardware": "Hardware de red",
|
||||
"Systeminfo_Storage": "Almacenamiento",
|
||||
"Systeminfo_Storage_Mount": "Punto de montaje:",
|
||||
"Systeminfo_Storage_Device" : "Dispositivo:",
|
||||
"Systeminfo_Storage_Size": "Tamaño:",
|
||||
"Systeminfo_Storage_Type": "Tipo:",
|
||||
"Systeminfo_Storage_Usage": "Uso de almacenamiento",
|
||||
"Systeminfo_Storage_Usage_Mount": "Punto de montaje:",
|
||||
"Systeminfo_Storage_Usage_Total": "Total:",
|
||||
"Systeminfo_Storage_Usage_Used": "Usado:",
|
||||
"Systeminfo_Storage_Usage_Free": "Libre:",
|
||||
"Systeminfo_Services": "Servicios",
|
||||
"Systeminfo_Services_Name": "Nombre del servicio",
|
||||
"Systeminfo_Services_Description": "Descripción del servicio",
|
||||
"Systeminfo_System": "Sistema",
|
||||
"Systeminfo_System_Architecture": "Arquitectura:",
|
||||
"Systeminfo_System_AVG": "Cargar promedio:",
|
||||
"Systeminfo_System_Kernel": "Núcleo:",
|
||||
"Systeminfo_System_OSVersion": "Sistema Operativo:",
|
||||
"Systeminfo_System_Running_Processes" : "Procesos corriendo:",
|
||||
"Systeminfo_System_System": "Sistema:",
|
||||
"Systeminfo_System_Uname": "Uname:",
|
||||
"Systeminfo_System_Uptime": "Tiempo de actividad:",
|
||||
"Systeminfo_USB_Devices": "Dispositivos USB"
|
||||
}
|
||||
}
|
||||
@@ -1,693 +0,0 @@
|
||||
<?php
|
||||
|
||||
$lang['es_es'] = array(
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// About - Update by @TeroRERO 07ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'About_Title' => 'Guadián de Red <br>(Código Abierto)',
|
||||
'About_Design' => 'Diseñado para:',
|
||||
'About_Exit' => 'Salir',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// General - Update by @TeroRERO 01ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Gen_Delete' => 'Eliminar',
|
||||
'Gen_DeleteAll' => 'Eliminar todo',
|
||||
'Gen_Cancel' => 'Cancelar',
|
||||
'Gen_Okay' => 'Aceptar',
|
||||
'Gen_Save' => 'Guardar',
|
||||
'Gen_Saved' => 'Guardado',
|
||||
'Gen_Run' => 'Ejecutar',
|
||||
'Gen_Action' => 'Acción',
|
||||
'Gen_Purge' => 'Purgar',
|
||||
'Gen_Backup' => 'Ejecutar copia de seguridad',
|
||||
'Gen_Restore' => 'Ejecutar restauración',
|
||||
'Gen_Switch' => 'Cambiar',
|
||||
'Gen_AreYouSure' => '¿Estás seguro de',
|
||||
'Gen_Upd' => 'Actualizado correctamente',
|
||||
'Gen_Upd_Fail' => 'Fallo al actualizar',
|
||||
'Gen_ReadDocs' => 'Ayuda',
|
||||
'Gen_DataUpdatedUITakesTime' => 'Correcto - La interfaz puede tardar en actualizarse si se está ejecutando un escaneo.',
|
||||
'Gen_LockedDB' => 'Fallo - La base de datos puede estar bloqueada - Pulsa F1 -> Ajustes de desarrolladores -> Consola o prueba más tarde.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Login Page - Update by @TeroRERO 03ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// TeroRERO Off 'Login_Box' => 'Inicie su sesión',
|
||||
|
||||
'Login_Box' => 'Ingrese su contraseña',
|
||||
'Login_Remember' => 'Recordar',
|
||||
'Login_Remember_small' => '(válido por 7 días)',
|
||||
'Login_Submit' => 'Ingresar',
|
||||
'Login_Psw_run' => 'Para cambiar contraseña ejecute:',
|
||||
'Login_Psw_new' => 'nueva_contraseña',
|
||||
'Login_Psw_folder' => 'en la carpeta config.',
|
||||
'Login_Psw_alert' => '¡Alerta de Contraseña!',
|
||||
'Login_Psw-box' => 'Contraseña',
|
||||
'Login_Toggle_Info' => 'Información sobre la contraseña',
|
||||
'Login_Toggle_Info_headline' => 'Información sobre la contraseña',
|
||||
'Login_Toggle_Alert_headline' => 'Alerta de Contraseña!',
|
||||
'Login_Default_PWD' => 'La contraseña por defecto "123456" sigue activa.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Page - Update by @TeroRERO 03ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Navigation_Devices' => 'Dispositivos',
|
||||
'Navigation_Presence' => 'Historial',
|
||||
'Navigation_Events' => 'Eventos',
|
||||
'Navigation_Network' => 'Red',
|
||||
'Navigation_Plugins' => 'Plugins',
|
||||
'Navigation_Maintenance' => 'Mantenimiento',
|
||||
'Navigation_Settings' => 'Configuración',
|
||||
'Navigation_HelpFAQ' => 'Ayuda / Preguntas frecuentes',
|
||||
'Device_Title' => 'Dispositivos',
|
||||
'Device_Shortcut_AllDevices' => 'Todos',
|
||||
'Device_Shortcut_Connected' => 'Conectado(s)',
|
||||
'Device_Shortcut_Favorites' => 'Favorito(s)',
|
||||
'Device_Shortcut_NewDevices' => 'Nuevo(s)',
|
||||
'Device_Shortcut_DownAlerts' => 'Alerta(s) de caída(s)',
|
||||
'Device_Shortcut_Archived' => 'Archivado(s)',
|
||||
'Device_Shortcut_Devices' => 'Dispositivos',
|
||||
'Device_Shortcut_OnlineChart' => 'Presencia del dispositivo a lo largo del tiempo',
|
||||
'Device_TableHead_Name' => 'Nombre',
|
||||
'Device_TableHead_Owner' => 'Propietario',
|
||||
'Device_TableHead_Type' => 'Tipo',
|
||||
'Device_TableHead_Icon' => 'Icon',
|
||||
'Device_TableHead_RowID' => 'Row ID',
|
||||
'Device_TableHead_Rowid' => 'Row ID',
|
||||
'Device_TableHead_Parent_MAC' => 'Nodo principal de la MAC',
|
||||
'Device_TableHead_Connected_Devices' => 'Dispositivos conectados',
|
||||
'Device_TableHead_Location' => 'Ubicación',
|
||||
'Device_TableHead_Vendor' => 'Fabricante',
|
||||
'Device_TableHead_Favorite' => 'Favorito',
|
||||
'Device_TableHead_Group' => 'Grupo',
|
||||
'Device_TableHead_FirstSession' => '1ra. sesión',
|
||||
'Device_TableHead_LastSession' => 'Última sesión',
|
||||
'Device_TableHead_LastIP' => 'Última IP',
|
||||
'Device_TableHead_MAC' => 'MAC',
|
||||
'Device_TableHead_MAC_full' => 'MAC completa',
|
||||
'Device_TableHead_LastIPOrder' => 'Última orden de IP',
|
||||
'Device_TableHead_Status' => 'Estado',
|
||||
'Device_Searchbox' => 'Búsqueda',
|
||||
'Device_Tablelenght' => 'Mostrar _MENU_ entradas',
|
||||
'Device_Tablelenght_all' => 'Todos',
|
||||
'Device_Table_info' => 'Mostrando el INICIO y el FINAL de TODAS las entradas',
|
||||
'Device_Table_nav_next' => 'Siguiente',
|
||||
'Device_Table_nav_prev' => 'Anterior',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Presence Page - Update by @TeroRERO 25jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Presence_Title' => 'Historial por dispositivo',
|
||||
'Presence_Shortcut_AllDevices' => 'Todos',
|
||||
'Presence_Shortcut_Connected' => 'Conectado(s)',
|
||||
'Presence_Shortcut_Favorites' => 'Favorito(s)',
|
||||
'Presence_Shortcut_NewDevices' => 'Nuevo(s)',
|
||||
'Presence_Shortcut_DownAlerts' => 'Alerta(s) de caída(s)',
|
||||
'Presence_Shortcut_Archived' => 'Archivado(s)',
|
||||
'Presence_Shortcut_Devices' => 'Dispositivos',
|
||||
|
||||
// Localizationfiles under pialert/front/lib/AdminLTE/bower_components/fullcalendar/dist/locale
|
||||
'Presence_CallHead_Devices' => 'Dispositivos',
|
||||
'Presence_CalHead_lang' => 'es-es',
|
||||
'Presence_CalHead_year' => 'año',
|
||||
'Presence_CalHead_quarter' => 'trimestre',
|
||||
'Presence_CalHead_month' => 'mes',
|
||||
'Presence_CalHead_week' => 'semana',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Events Page - Update by @TeroRERO 25jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Events_Title' => 'Eventos',
|
||||
'Events_Periodselect_today' => 'Hoy',
|
||||
'Events_Periodselect_LastWeek' => 'La semana pasada',
|
||||
'Events_Periodselect_LastMonth' => 'El mes pasado',
|
||||
'Events_Periodselect_LastYear' => 'El año pasado',
|
||||
'Events_Periodselect_All' => 'Toda la información',
|
||||
'Events_Shortcut_AllEvents' => 'Todos los eventos',
|
||||
'Events_Shortcut_Sessions' => 'Sesiones',
|
||||
'Events_Shortcut_MissSessions' => 'Sesiones faltantes',
|
||||
'Events_Shortcut_VoidSessions' => 'Sesiones anuladas',
|
||||
'Events_Shortcut_NewDevices' => 'Nuevo(s)',
|
||||
'Events_Shortcut_DownAlerts' => 'Alerta(s) de caída(s)',
|
||||
'Events_Shortcut_Events' => 'Eventos',
|
||||
'Events_TableHead_Order' => 'Ordenar',
|
||||
'Events_TableHead_Device' => 'Dispositivo',
|
||||
'Events_TableHead_Owner' => 'Propietario',
|
||||
'Events_TableHead_Date' => 'Fecha',
|
||||
'Events_TableHead_EventType' => 'Tipo de evento',
|
||||
'Events_TableHead_Connection' => 'Conexión',
|
||||
'Events_TableHead_Disconnection' => 'Desconexión',
|
||||
'Events_TableHead_Duration' => 'Duración',
|
||||
'Events_TableHead_DurationOrder' => 'Orden de duración',
|
||||
'Events_TableHead_IP' => 'Dirección IP',
|
||||
'Events_TableHead_IPOrder' => 'Orden de IP',
|
||||
'Events_TableHead_AdditionalInfo' => 'Información adicional',
|
||||
'Events_Searchbox' => 'Búsqueda',
|
||||
'Events_Tablelenght' => 'Mostrando entradas del MENÚ',
|
||||
'Events_Tablelenght_all' => 'Todos',
|
||||
'Events_Table_info' => 'Mostrando el INICIO y el FINAL de TODAS las entradas',
|
||||
'Events_Table_nav_next' => 'Siguiente',
|
||||
'Events_Table_nav_prev' => 'Anterior',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Details Page - Update by @TeroRERO 01ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'DevDetail_Periodselect_today' => 'Hoy',
|
||||
'DevDetail_Periodselect_LastWeek' => 'La semana pasada',
|
||||
'DevDetail_Periodselect_LastMonth' => 'El mes pasado',
|
||||
'DevDetail_Periodselect_LastYear' => 'El año pasado',
|
||||
'DevDetail_Periodselect_All' => 'Toda la información',
|
||||
'DevDetail_Shortcut_CurrentStatus' => 'Estado actual',
|
||||
'DevDetail_Shortcut_Sessions' => 'Sesiones',
|
||||
'DevDetail_Shortcut_Presence' => 'Historial',
|
||||
'DevDetail_Shortcut_DownAlerts' => 'Alerta(s) de caída(s)',
|
||||
'DevDetail_Tab_Details' => 'Detalles',
|
||||
'DevDetail_Tab_Nmap' => 'Nmap',
|
||||
'DevDetail_Tab_Sessions' => 'Sesiones',
|
||||
'DevDetail_Tab_Presence' => 'Historial',
|
||||
'DevDetail_Tab_Events' => 'Eventos',
|
||||
'DevDetail_Tab_Pholus' => '<i class="fa fa-search"></i> Pholus',
|
||||
'DevDetail_Tab_PholusEmpty' => 'No se ha encontrado nada para este dispositivo con Pholus.',
|
||||
'DevDetail_Tab_NmapTableHeader' => 'Resultados del escaneo programado',
|
||||
'DevDetail_Tab_NmapTableText' => 'Establece la programación en los <a href="/settings.php#NMAP_ACTIVE">Ajustes</a>',
|
||||
'DevDetail_Tab_NmapEmpty' => 'Ningún puerto detectado en este dispositivo con Nmap.',
|
||||
'DevDetail_MainInfo_Title' => 'Información principal',
|
||||
'DevDetail_MainInfo_mac' => 'MAC',
|
||||
'DevDetail_MainInfo_Name' => 'Nombre',
|
||||
'DevDetail_MainInfo_Owner' => 'Propietario',
|
||||
'DevDetail_MainInfo_Type' => 'Tipo',
|
||||
'DevDetail_Icon' => 'Icono',
|
||||
'DevDetail_Icon_Descr' => 'Enter a font awesome icon name without the fa- prefix or with complete class, e.g.: fa fa-brands fa-apple.',
|
||||
'DevDetail_MainInfo_Vendor' => 'Proveedor',
|
||||
'DevDetail_MainInfo_Favorite' => 'Favorito',
|
||||
'DevDetail_MainInfo_Group' => 'Grupo',
|
||||
'DevDetail_MainInfo_Location' => 'Ubicación',
|
||||
'DevDetail_MainInfo_Comments' => 'Comentario',
|
||||
'DevDetail_MainInfo_Network' => 'Hardware de Red (ID)',
|
||||
'DevDetail_MainInfo_Network' => '<i class="fa fa-server"></i> Nodo (MAC)',
|
||||
'DevDetail_GoToNetworkNode' => 'Navegar a la página de Internet del nodo seleccionado.',
|
||||
'DevDetail_MainInfo_Network_Port' => 'Puerto de Red HW',
|
||||
'DevDetail_SessionInfo_Title' => 'Información de sesión',
|
||||
'DevDetail_SessionInfo_Status' => 'Estado',
|
||||
'DevDetail_SessionInfo_FirstSession' => '1ra. sesión',
|
||||
'DevDetail_SessionInfo_LastSession' => 'Última sesión',
|
||||
'DevDetail_SessionInfo_LastIP' => 'Última IP',
|
||||
'DevDetail_SessionInfo_StaticIP' => 'IP estática',
|
||||
'DevDetail_EveandAl_Title' => 'Configuración de eventos y alertas',
|
||||
'DevDetail_EveandAl_ScanCycle' => 'Ciclo de escaneo',
|
||||
'DevDetail_EveandAl_AlertAllEvents' => 'Alerta a todos los eventos',
|
||||
'DevDetail_EveandAl_AlertDown' => 'Alerta de caída',
|
||||
'DevDetail_EveandAl_Skip' => 'Omitir notificaciones repetidas durante',
|
||||
'DevDetail_EveandAl_NewDevice' => 'Nuevo dispositivo',
|
||||
'DevDetail_EveandAl_Archived' => 'Archivada',
|
||||
'DevDetail_EveandAl_RandomMAC' => 'MAC al azar',
|
||||
'DevDetail_EveandAl_ScanCycle_a' => 'Escanear Dispositivo',
|
||||
'DevDetail_EveandAl_ScanCycle_z' => 'No Escanear Dispositivo',
|
||||
'DevDetail_button_Delete' => 'Eliminar dispositivo',
|
||||
'DevDetail_button_Reset' => 'Restablecer cambios',
|
||||
'DevDetail_button_DeleteEvents_Warning' => '¿Desea eliminar todos los eventos de este dispositivo?<br><br>(se eliminarán el <b>Historial de eventos</b> y las <b>Sesiones</b>, y puede ayudar en el caso de notificaciones constantes)',
|
||||
'DevDetail_button_Reset' => 'Restablecer cambios',
|
||||
'DevDetail_button_Save' => 'Guardar',
|
||||
'DevDetail_button_OverwriteIcons' => 'Sobreescribir iconos',
|
||||
'DevDetail_button_OverwriteIcons_Tooltip' => 'Sobreescribir los iconos de todos los dispositivos con el mismo tipo',
|
||||
'DevDetail_button_OverwriteIcons_Warning' => '¿Sobreescribir todos los iconos de todos los dispositivos con el mismo tipo que el dispositivo actual?',
|
||||
'DevDetail_SessionTable_Order' => 'Ordenar',
|
||||
'DevDetail_SessionTable_Connection' => 'Conexión',
|
||||
'DevDetail_SessionTable_Disconnection' => 'Desconexión',
|
||||
'DevDetail_SessionTable_Duration' => 'Duración',
|
||||
'DevDetail_SessionTable_IP' => 'Dirección IP',
|
||||
'DevDetail_SessionTable_Additionalinfo' => 'Información adicional',
|
||||
'DevDetail_Events_CheckBox' => 'Ocultar eventos de conexión',
|
||||
'DevDetail_Nmap_buttonFast' => 'Exploración rápida',
|
||||
'DevDetail_Nmap_buttonDefault' => 'Escaneado predeterminado',
|
||||
'DevDetail_Nmap_buttonDetail' => 'Escaneo detallado',
|
||||
'DevDetail_Nmap_buttonFast_text' => 'Escaneo rápido: escanee menos puertos (100) que el escaneo predeterminado (unos pocos segundos)',
|
||||
'DevDetail_Nmap_buttonDefault_text' => 'Escaneo predeterminado: NMAP escanea los 1,000 puertos principales para cada protocolo de escaneo solicitado. Esto atrapa aproximadamente el 93% de los puertos TCP y el 49% de los puertos UDP. (aproximadamente 5 segundos)',
|
||||
'DevDetail_Nmap_buttonDetail_text' => 'Escaneo detallado: escaneo predeterminado con detección de sistema operativo habilitado, detección de versiones, escaneo de script y traceroute (hasta 30 segundos o más)',
|
||||
'DevDetail_Nmap_buttonSkipDiscovery' => 'Omitir detección de host',
|
||||
'DevDetail_Nmap_buttonSkipDiscovery_text' => 'Omitir detección de host (-Pn opción): Escaneo predeterminado sin detección de host',
|
||||
'DevDetail_Nmap_resultsLink' => 'Puedes abandonar esta página después de empezar un escaneo. Los resultados también estarán disponibles en el archivo <code>pialert_front.log</code>.',
|
||||
'BackDevDetail_Actions_Title_Run' => 'Ejecutar acción',
|
||||
'BackDevDetail_Actions_Not_Registered' => 'Acción no registrada: ',
|
||||
'BackDevDetail_Actions_Ask_Run' => '¿Desea ejecutar la acción?',
|
||||
'BackDevDetail_Tools_WOL_okay' => 'El comando se ha ejecutado correctamente.',
|
||||
'BackDevDetail_Tools_WOL_error' => 'Ha ocurrido un error al ejectuar el comando.',
|
||||
'DevDetail_Tools_WOL_noti' => 'Wake-on-LAN',
|
||||
'DevDetail_Tools_WOL_noti_text' => 'El comando de Wake-on-LAN en enviado a la dirección de escucha. Si el dispositivo no está en la misma subred/vlan que Pi.Alert, el dispositivo no responderá.',
|
||||
'DevDetail_Tools_WOL' => 'Enviar comando WOL a ',
|
||||
'DevDetail_WOL_Title' => '<i class="fa fa-power-off"></i> Wake-on-LAN',
|
||||
'DevDetail_Run_Actions_Title' => '<i class="fa fa-play"></i> Ejecutar acción en el dispositivo',
|
||||
'DevDetail_Run_Actions_Tooltip' => 'Ejecutar la acción del desplegable sobre el dispositivo actual.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page - Update by @TeroRERO 07ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Maintenance_Title' => 'Herramientas de mantenimiento',
|
||||
'Maintenance_version' => 'Actualizaciones de la aplicación',
|
||||
'Maintenance_new_version' => '🆕 Una nueva versión está disponible. Comprueba las <a href="https://github.com/jokob-sk/Pi.Alert/releases" target="_blank">notas de lanzamiento</a>.',
|
||||
'Maintenance_current_version' => 'No hay actualizaciones disponibles. Comprueba en que <a href="https://github.com/jokob-sk/Pi.Alert/issues/138" target="_blank">se está trabajando</a>.',
|
||||
'Maintenance_database_path' => 'Ruta de la base de datos:',
|
||||
'Maintenance_database_size' => 'Tamaño de base de datos:',
|
||||
'Maintenance_database_lastmod' => 'Última modificación:',
|
||||
'Maintenance_database_backup' => 'Copias de seguridad de la BD:',
|
||||
'Maintenance_database_backup_found' => 'copia(s) de seguridad encontrada(s)',
|
||||
'Maintenance_database_backup_total' => 'Uso total de disco',
|
||||
'Maintenance_arp_status' => 'Estado de escaneo:',
|
||||
'Maintenance_arp_status_off' => 'está actualmente deshabilitado',
|
||||
'Maintenance_arp_status_on' => 'escaneo(s) actualmente en ejecución',
|
||||
'Maintenance_themeselector_lable' => 'Seleccionar tema',
|
||||
'Maintenance_themeselector_empty' => 'Elige un tema',
|
||||
'Maintenance_themeselector_apply' => 'Aplicar',
|
||||
'Maintenance_themeselector_text' => 'El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.',
|
||||
'Maintenance_lang_selector_lable' => 'Seleccione su idioma',
|
||||
'Maintenance_lang_selector_empty' => 'Elija un idioma',
|
||||
'Maintenance_lang_en_us' => 'English (US)',
|
||||
'Maintenance_lang_de_de' => 'German (DE)',
|
||||
'Maintenance_lang_es_es' => 'Spanish (ES)',
|
||||
'Maintenance_lang_selector_text' => 'El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.',
|
||||
'Maintenance_lang_selector_apply' => 'Aplicar',
|
||||
'Maintenance_Tools_Tab_Settings' => 'Ajustes',
|
||||
'Maintenance_Tools_Tab_UISettings' => 'Ajustes de interfaz',
|
||||
'Maintenance_Tools_Tab_Tools' => 'Herramientas',
|
||||
'Maintenance_Tools_Tab_BackupRestore' => 'Respaldo / Restaurar',
|
||||
'Maintenance_Tools_Tab_Logging' => 'Registros',
|
||||
'Maintenance_Tool_displayed_columns_text' => 'Cambia la visibilidad y el orden de las columnas en la página <a href="devices.php"><b> <i class="fa fa-laptop"></i> Dispositivos</b></a> . (La función de coger y arrastrar funciona un poco mal, pero funciona. (Se intentó arreglar <a href="https://github.com/jokob-sk/Pi.Alert/commit/94b32f0f7332879f5a7d2af05dafa2e5d5cfa5da">como por 3 horas</a> - se agradecerían PRs para arreglarlo)).',
|
||||
'Maintenance_Tool_order_columns_text' => '',
|
||||
'Maintenance_Tool_darkmode' => 'Cambiar Modo (Dark/Light)',
|
||||
'Maintenance_Tool_drag_me' => 'Coger para rearrastrar columnas.',
|
||||
'Maintenance_Tool_check_visible' => 'Desactivar para ocultar columna.',
|
||||
'Maintenance_Tool_darkmode_text' => 'Alternar entre el modo oscuro y el modo de luz. Si el interruptor no funciona correctamente, intente borrar el caché del navegador. El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.',
|
||||
'Maintenance_Tool_darkmode_noti' => 'Cambiar Modo',
|
||||
'Maintenance_Tool_darkmode_noti_text' => 'Después del cambio de tema, la página intenta volver a cargar para activar el cambio. Si es necesario, el caché debe ser eliminado.',
|
||||
'Maintenance_Tool_arpscansw' => 'Activar arp-scan (on/off)',
|
||||
'Maintenance_Tool_arpscansw_text' => 'Encender o desactivar el arp-scan. Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente. Los escaneos activos no se cancelan.',
|
||||
'Maintenance_Tool_arpscansw_noti' => 'Activar arp-scan on or off',
|
||||
'Maintenance_Tool_arpscansw_noti_text' => 'Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente.',
|
||||
'Maintenance_Tool_del_empty_macs' => 'Eliminar dispositivos con MACs vacíos',
|
||||
'Maintenance_Tool_del_empty_macs_text' => 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos sin Mac se eliminarán de la base de datos.',
|
||||
'Maintenance_Tool_del_empty_macs_noti' => 'Eliminar dispositivos',
|
||||
'Maintenance_Tool_del_empty_macs_noti_text' => '¿Estás seguro de que quieres eliminar todos los dispositivos con direcciones MAC vacías? <br> (tal vez prefiera archivarlo)',
|
||||
'Maintenance_Tool_upgrade_database_noti' => 'Actualizar la base de datos',
|
||||
'Maintenance_Tool_upgrade_database_text' => 'Este botón actualizará la base de datos para habilitar la actividad de la red en las últimas 12 horas. Haga una copia de seguridad de su base de datos en caso de problemas.',
|
||||
'Maintenance_Tool_upgrade_database_noti_text' => '¿Estás seguro de que quieres actualizar la base de datos? <br> (tal vez prefieras archivarla)',
|
||||
'Maintenance_Tool_del_alldev' => 'Eliminar todos los dispositivos',
|
||||
'Maintenance_Tool_del_alldev_text' => 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos se eliminarán de la base de datos.',
|
||||
'Maintenance_Tool_del_alldev_noti' => 'Eliminar dispositivos',
|
||||
'Maintenance_Tool_del_alldev_noti_text' => '¿Estás seguro de que quieres eliminar todos los dispositivos?',
|
||||
'Maintenance_Tool_del_unknowndev' => 'Eliminar dispositivos (desconocidos)',
|
||||
'Maintenance_Tool_del_unknowndev_text' => 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos nombrados (desconocidos) se eliminarán de la base de datos.',
|
||||
'Maintenance_Tool_del_unknowndev_noti' => 'Eliminar dispositivos (desconocidos)',
|
||||
'Maintenance_Tool_del_unknowndev_noti_text' => '¿Estás seguro de que quieres eliminar todos los dispositivos (desconocidos)?',
|
||||
'Maintenance_Tool_del_allevents' => 'Eliminar todo (Restablecer historial)',
|
||||
'Maintenance_Tool_del_allevents_text' => 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Se eliminarán todos los eventos en la base de datos. En ese momento se restablecerá la presencia de todos los dispositivos. Esto puede conducir a sesiones no válidas. Esto significa que los dispositivos se muestran como "presentes", aunque están fuera de línea. Un escaneo mientras el dispositivo en cuestión está en línea resuelve el problema.',
|
||||
'Maintenance_Tool_del_allevents_noti' => 'Eliminar eventos',
|
||||
'Maintenance_Tool_del_allevents_noti_text' => '¿Estás seguro de que quieres eliminar todos los eventos? Esto restablece la presencia de todos los dispositivos.',
|
||||
'Maintenance_Tool_del_allevents30' => 'Eliminar eventos antiguos (30 días)',
|
||||
'Maintenance_Tool_del_allevents30_text' => 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Se eliminarán todos los eventos mayores a 30 días en la base de datos. En ese momento se restablecerá la presencia de todos los dispositivos. Esto puede conducir a sesiones no válidas. Esto significa que los dispositivos se muestran como "presentes", aunque están fuera de línea. Un escaneo mientras el dispositivo en cuestión está en línea resuelve el problema.',
|
||||
'Maintenance_Tool_del_allevents30_noti' => 'Eliminar eventos',
|
||||
'Maintenance_Tool_del_allevents30_noti_text' => '¿Está seguro de eliminar todos los eventos mayores a 30 días? Esto restablece la presencia de todos los dispositivos.',
|
||||
'Maintenance_Tool_backup' => 'Respaldar DB',
|
||||
'Maintenance_Tool_backup_text' => 'Las copias de seguridad de la base de datos se encuentran en el directorio de la base de datos como una Zip-Archive, nombrada con la fecha de creación. No hay un número máximo de copias de seguridad.',
|
||||
'Maintenance_Tool_backup_noti' => 'Respaldar DB',
|
||||
'Maintenance_Tool_backup_noti_text' => '¿Estás seguro de que quieres exactos la copia de seguridad de DB? Asegúrese de que ningún escaneo se esté ejecutando actualmente.',
|
||||
'Maintenance_Tool_restore' => 'Restaurar DB',
|
||||
'Maintenance_Tool_restore_text' => 'La última copia de seguridad se puede restaurar a través del botón, pero las copias de seguridad anteriores solo se pueden restaurar manualmente. Después de la restauración, realice una verificación de integridad en la base de datos por seguridad, en caso de que el DB estuviera actualmente en acceso de escritura cuando se creó la copia de seguridad.',
|
||||
'Maintenance_Tool_restore_noti' => 'Restaurar DB',
|
||||
'Maintenance_Tool_restore_noti_text' => '¿Estás seguro de que quieres hacer exactos la restauración de DB? Asegúrese de que ningún escaneo se esté ejecutando actualmente.',
|
||||
'Maintenance_Tool_purgebackup' => 'Purgar Respaldos',
|
||||
'Maintenance_Tool_purgebackup_text' => 'Todas las copias de seguridad serán eliminadas, excepto las 3 últimas.',
|
||||
'Maintenance_Tool_purgebackup_noti' => 'Purgar Respaldos',
|
||||
'Maintenance_Tool_purgebackup_noti_text' => '¿Está seguro de borrar todas las copias de seguridad excepto las 3 últimas?',
|
||||
'Maintenance_Tool_del_ActHistory' => 'Eliminar la actividad de la red',
|
||||
'Maintenance_Tool_del_ActHistory_text' => 'El gráfico de actividad de la red se resetea. Esto no afecta a los eventos.',
|
||||
'Maintenance_Tool_del_ActHistory_noti' => 'Borrar la actividad de la red',
|
||||
'Maintenance_Tool_del_ActHistory_noti_text' => '¿Está seguro de restablecer la actividad de la red?',
|
||||
'Maintenance_Tool_ExportCSV' => 'Exportación CSV',
|
||||
'Maintenance_Tool_ExportCSV_text' => 'Generar un archivo CSV (valores separados por comas) que contenga la lista de dispositivos incluyendo las relaciones de red entre los nodos de red y los dispositivos conectados.',
|
||||
'Maintenance_Tool_ExportCSV_noti' => 'Exportación CSV',
|
||||
'Maintenance_Tool_ExportCSV_noti_text' => '¿Está seguro de que quiere generar un archivo CSV?',
|
||||
'Maintenance_Tool_ImportCSV' => 'Importación CSV',
|
||||
'Maintenance_Tool_ImportCSV_text' => 'Antes de usar esta función, haga una copia de seguridad. Importe un archivo CSV (valor separado por comas) que contiene la lista de dispositivos, incluidas las relaciones de red entre nodos de red y dispositivos conectados. Para hacer eso, coloque el archivo CSV llamado <b> devices.csv </b> en su carpeta <b>/config </b>.',
|
||||
'Maintenance_Tool_ImportCSV_noti' => 'Importación CSV',
|
||||
'Maintenance_Tool_ImportCSV_noti_text' => '¿Está seguro de que quiere importar el archivo CSV? Esto sobrescribirá completamente los dispositivos de su base de datos.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page - Update by @TeroRERO 25jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'BackDevices_Arpscan_disabled' => 'Arp-Scan Desactivado',
|
||||
'BackDevices_Arpscan_enabled' => 'Arp-Scan Activado',
|
||||
'BackDevices_darkmode_disabled' => 'Darkmode Desactivado',
|
||||
'BackDevices_darkmode_enabled' => 'Darkmode Activado',
|
||||
'BackDevices_Restore_CopError' => 'La base de datos original no se pudo guardar.',
|
||||
'BackDevices_Restore_okay' => 'Restauración ejecutado con éxito.',
|
||||
'BackDevices_Restore_Failed' => 'La restauración falló. Restaurar la copia de seguridad manualmente.',
|
||||
'BackDevices_Backup_CopError' => 'La base de datos original no se pudo guardar.',
|
||||
'BackDevices_Backup_okay' => 'La copia de seguridad ejecutada con éxito con el nuevo archivo',
|
||||
'BackDevices_Backup_Failed' => 'La copia de seguridad se ejecutó parcialmente con éxito. El archivo no se puede crear o está vacío.',
|
||||
'BackDevices_DBTools_DelDev_a' => 'Dispositivo eliminado con éxito',
|
||||
'BackDevices_DBTools_DelDev_b' => 'Dispositivos eliminados con éxito',
|
||||
'BackDevices_DBTools_DelEvents' => 'Eventos eliminados con éxito',
|
||||
'BackDevices_DBTools_DelEventsError' => 'Error de eliminación de eventos',
|
||||
'BackDevices_DBTools_DelDevError_a' => 'Error de eliminación del dispositivo',
|
||||
'BackDevices_DBTools_DelDevError_b' => 'Error de eliminación de dispositivos',
|
||||
'BackDevices_DBTools_UpdDev' => 'Dispositivo actualizado con éxito',
|
||||
'BackDevices_DBTools_UpdDevError' => 'Error al actualizar el dispositivo',
|
||||
'BackDevices_DBTools_Upgrade' => 'Base de datos actualizada correctamente',
|
||||
'BackDevices_DBTools_UpgradeError' => 'Falló la actualización de la base de datos',
|
||||
'BackDevices_DBTools_Purge' => 'Las copias de seguridad más antiguas fueron eliminadas',
|
||||
'BackDevices_DBTools_ImportCSV' => 'Los dispositivos del archivo CSV han sido importados correctamente.',
|
||||
'BackDevices_DBTools_ImportCSVError' => 'El archivo CSV no pudo ser importado. Asegúrate de que el formato es correcto.',
|
||||
'BackDevices_DBTools_ImportCSVMissing' => 'El archivo CSV no se pudo encontrar en <b>/config/devices.csv.</b>',
|
||||
'BackDevices_Device_UpdDevError' => 'Fallo al actualizar dispositivos, pruebe de nuevo más tarde. La base de datos probablemente esté bloqueada por una tarea en curso.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Network Page - Update by @TeroRERO 01ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Network_Title' => 'Descripción general de la red',
|
||||
'Network_ManageDevices' => 'Administrar dispositivos',
|
||||
'Network_ManageAdd' => 'Añadir dispositivo',
|
||||
'Network_ManageAssign' => 'Asignar',
|
||||
'Network_ManageUnassign' => 'Desasignar',
|
||||
'Network_ManageEdit' => 'Actualizar dispositivo',
|
||||
'Network_ManageDel' => 'Eliminar dispositivo',
|
||||
'Network_ManageAdd_Name' => 'Nombre del dispositivo',
|
||||
'Network_ManageAdd_Name_text' => 'Nombre sin caracteres especiales',
|
||||
'Network_ManageAdd_Type' => 'Tipo de dispositivo',
|
||||
'Network_ManageAdd_Type_text' => '-- Seleccionar tipo --',
|
||||
'Network_ManageAdd_Port' => 'Recuento de puertos',
|
||||
'Network_ManageAdd_Port_text' => 'dejar en blanco para WiFi y Powerline',
|
||||
'Network_ManageAdd_Submit' => 'Añadir dispositivo',
|
||||
'Network_ManageEdit_ID' => 'Dispositivo para actualizar',
|
||||
'Network_ManageEdit_ID_text' => '-- Seleccione el dispositivo para editar --',
|
||||
'Network_ManageEdit_Name' => 'Nuevo nombre del dispositivo',
|
||||
'Network_ManageEdit_Name_text' => 'Nombre sin caracteres especiales',
|
||||
'Network_ManageEdit_Type' => 'Nuevo tipo de dispositivo',
|
||||
'Network_ManageEdit_Type_text' => '-- Seleccione tipo --',
|
||||
'Network_ManageEdit_Port' => ' Nuevo recuento de puertos',
|
||||
'Network_ManageEdit_Port_text' => 'Dejar en blanco para WiFi y Powerline',
|
||||
'Network_ManageEdit_Submit' => 'Guardar los cambios',
|
||||
'Network_ManageDel_Name' => 'Dispositivo para eliminar',
|
||||
'Network_ManageDel_Name_text' => '-- Seleccione el dispositivo --',
|
||||
'Network_ManageDel_Submit' => 'Eliminar',
|
||||
'Network_Table_State' => 'Estado',
|
||||
'Network_Table_Hostname' => 'Nombre de host',
|
||||
'Network_Table_IP' => 'Dirección IP',
|
||||
'Network_UnassignedDevices' => 'Dispositivos sin asignar',
|
||||
'Network_Assign' => 'Conectar al nodo de <i class="fa fa-server"></i> red',
|
||||
'Network_Connected' => 'Dispositivos conectados',
|
||||
'Network_ManageLeaf' => 'Gestionar asignación',
|
||||
'Network_Node' => 'Nodo de red',
|
||||
'Network_Node_Name' => 'Nombre de nodo',
|
||||
'Network_Parent' => 'Dispositivo primario de la red',
|
||||
'Network_NoAssignedDevices' => 'Este nodo de red no tiene asignado ningún dispositivo (nodo externo). Asigna uno de la lista o ve a la pestaña <b><i class="fa fa-info-circle"></i> Detalles</b> de cualquier dispositivo en la página<a href="devices.php"><b> <i class="fa fa-laptop"></i> Dispositivos</b></a>, y asígnalo a un <b><i class="fa fa-server"></i> Nodo (MAC)</b> <b><i class="fa fa-ethernet"></i> Puerto</b> de la red ahí.',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Help Page - Update by @TeroRERO 07ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'HelpFAQ_Title' => 'Ayuda / FAQ',
|
||||
'HelpFAQ_Cat_General' => 'General',
|
||||
'HelpFAQ_Cat_Detail' => 'Detalles',
|
||||
'HelpFAQ_Cat_General_100_head' => 'El reloj en la parte superior derecha y el tiempo de los eventos/presencia no son correctos (diferencia de tiempo).',
|
||||
'HelpFAQ_Cat_General_100_text_a' => 'En su PC, la siguiente zona horaria está configurada para el entorno PHP:',
|
||||
'HelpFAQ_Cat_General_100_text_b' => 'Si esta no es la zona horaria en la que se encuentra, debe cambiar la zona horaria en el archivo de configuración de PHP. Puedes encontrarlo en este directorio:',
|
||||
'HelpFAQ_Cat_General_100_text_c' => 'Busque en este archivo la entrada "date.timezone", elimine el ";" inicial si es necesario e introduzca la zona horaria deseada. Puede encontrar una lista con las zonas horarias compatibles aquí (<a href="https://www.php.net/manual/en/timezones.php" target="blank">Link</a>)',
|
||||
'HelpFAQ_Cat_General_101_head' => 'Mi red parece ralentizarse, el streaming se "congela".',
|
||||
'HelpFAQ_Cat_General_101_text' => 'Es muy posible que los dispositivos de baja potencia alcancen sus límites de rendimiento con la forma en que Pi.Alert detecta nuevos dispositivos en la red. Esto se amplifica aún más,
|
||||
si estos dispositivos se comunican con la red a través de WLAN. Las soluciones aquí serían cambiar a una conexión por cable si es posible o, si el dispositivo sólo se va a utilizar durante un período de tiempo limitado, utilizar el arp scan.
|
||||
pausar el arp scan en la página de mantenimiento.',
|
||||
'HelpFAQ_Cat_General_102_head' => 'Me aparece el mensaje de que la base de datos es de sólo de lectura.',
|
||||
'HelpFAQ_Cat_General_102_text' => 'Compruebe en el directorio Pi.Alert si la carpeta de la base de datos (db) tiene asignados los permisos correctos:<br>
|
||||
<span class="text-danger help_faq_code">drwxrwx--- 2 (nombre de usuario) www-data</span><br>
|
||||
Si el permiso no es correcto, puede establecerlo de nuevo con los siguientes comandos en la terminal o la consola:<br>
|
||||
<span class="text-danger help_faq_code">
|
||||
sudo chgrp -R www-data ~/pialert/db<br>
|
||||
chmod -R 770 ~/pialert/db
|
||||
</span><br>
|
||||
Si la base de datos sigue siendo de sólo lectura, intente reinstalar o restaurar una copia de seguridad de la base de datos desde la página de mantenimiento.',
|
||||
'HelpFAQ_Cat_General_102docker_head' => '(🐳 Solo Docker) Problemas con la base de datos (errores de AJAX, solo lectura, no encontrado)',
|
||||
'HelpFAQ_Cat_General_102docker_text' => 'Comprueba que has seguido las instrucciones del <a href="https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles">dockerfile (la información más actualizada)</a>. <br/> <br/> <ul data-sourcepos="49:4-52:146" dir="auto">
|
||||
<li data-sourcepos="49:4-49:106">Descarga la <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db">base de datos original desde GitHub</a>.</li>
|
||||
<li data-sourcepos="50:4-50:195">Mapea el archivo <code>pialert.db</code> (<g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠</g-emoji> no carpeta) de arriba a <code>/home/pi/pialert/db/pialert.db</code> (puedes comprobar los <a href="https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples">ejemplos</a> para más detalles).</li>
|
||||
<li data-sourcepos="51:4-51:161">Si aparecen problemas (errores de AJAX, no se puede escribir a la base de datos, etc,) asegúrate que los permisos están establecidos correctamente. También puedes comprobar los registros en <code>/home/pi/pialert/front/log</code>.</li>
|
||||
<li data-sourcepos="52:4-52:146">Para arreglar los problemas de los permisos, puedes probar a crear una copia de seguridad de la base de datos y después restaurarla desde la sección <strong>Mantenimiento > Copia de seguridad/Restaurar</strong>.</li>
|
||||
<li data-sourcepos="53:4-53:228">Si la base de datos está en modo solo lectura, lo puedes arreglar ejecutando el siguiente comando para establecer el propietario y grupo en el sistema host: <code>docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db</code>.</li>
|
||||
</ul>',
|
||||
'HelpFAQ_Cat_General_103_head' => 'La página de inicio de sesión no aparece, incluso después de cambiar la contraseña.',
|
||||
'HelpFAQ_Cat_General_103_text' => 'Además de la contraseña, el archivo de configuración debe contener <span class="text-danger help_faq_code">~/pialert/config/pialert.conf</span>
|
||||
además el parámetro <span class="text-danger help_faq_code">PIALERT_WEB_PROTECTION</span> debe ajustarse a <span class="text-danger help_faq_code">True</span>.',
|
||||
'HelpFAQ_Cat_Device_200_head' => 'Tengo dispositivos en mi lista que no conozco. Después de borrarlos, siempre vuelven a aparecer.',
|
||||
'HelpFAQ_Cat_Device_200_text' => 'Si utiliza Pi-hole, tenga en cuenta que Pi.Alert recupera información de Pi-hole. Ponga en pausa Pi.Alert, vaya a la página de configuración de Pi-hole y
|
||||
elimine la concesión DHCP si es necesario. Luego, también en Pi-hole, revise en Herramientas -> Red para ver si puede encontrar los hosts recurrentes allí.
|
||||
Si es así, elimínelos también allí. Ahora puede volver a iniciar Pi.Alert. Ahora el dispositivo(s) no debería aparecer más.',
|
||||
'HelpFAQ_Cat_Detail_300_head' => '¿Qué significa? ',
|
||||
'HelpFAQ_Cat_Detail_300_text_a' => 'significa un dispositivo de red creado a partir de la página de red.',
|
||||
'HelpFAQ_Cat_Detail_300_text_b' => 'designa el número de puerto en el que el dispositivo editado actualmente está conectado a este dispositivo de red.',
|
||||
'HelpFAQ_Cat_Detail_301_head_a' => '¿Cuándo está escaneando ahora? En ',
|
||||
'HelpFAQ_Cat_Detail_301_head_b' => ' dice 1min pero el gráfico muestra intervalos de 5min.',
|
||||
'HelpFAQ_Cat_Detail_301_text' => 'El intervalo de tiempo entre los escaneos está definido por el "Cronjob", que está configurado en 5 minutos de forma predeterminada. La designación "1min" se refiere a la duración esperada del escaneo.
|
||||
Dependiendo de la configuración de la red, este tiempo puede variar. Para editar el cronjob, puede utilizar el siguiente comando en la terminal/consola <span class="text-danger help_faq_code">crontab -e</span>
|
||||
y cambiar el intervalo.',
|
||||
'HelpFAQ_Cat_Detail_302_head_a' => '¿Qué significa? ',
|
||||
'HelpFAQ_Cat_Detail_302_head_b' => '¿y por qué no puedo seleccionarlo?',
|
||||
'HelpFAQ_Cat_Detail_302_text' => 'Algunos dispositivos modernos generan direcciones MAC aleatorias por razones de privacidad, que ya no pueden asociarse a ningún fabricante y que vuelven a cambiar con cada nueva conexión.
|
||||
Pi.Alert detecta si se trata de una dirección MAC aleatoria y activa este "campo" automáticamente. Para deshabilitar este comportamiento, debe buscar en su dispositivo cómo deshabilitar la
|
||||
aleatorización de direcciones MAC.',
|
||||
'HelpFAQ_Cat_Detail_303_head' => '¿Qué es Nmap y para qué sirve?',
|
||||
'HelpFAQ_Cat_Detail_303_text' => 'Nmap es un escáner de red con múltiples capacidades.<br>
|
||||
Cuando aparece un nuevo dispositivo en su lista, tiene la posibilidad de obtener información más detallada sobre el dispositivo a través del escaneo de Nmap.',
|
||||
'HelpFAQ_Cat_Presence_400_head' => 'Los dispositivos se muestran con un marcador amarillo y la nota "evento faltante".',
|
||||
'HelpFAQ_Cat_Presence_400_text' => 'Si esto sucede, tiene la opción de eliminar los eventos en el dispositivo en cuestión (vista de detalles). Otra posibilidad sería encender el dispositivo y esperar hasta que Pi.Alert detecte el dispositivo como "online" con el siguiente
|
||||
escaneo y luego simplemente apagar el dispositivo nuevamente. Ahora Pi.Alert debería anotar correctamente el estado del dispositivo en la base de datos con el próximo escaneo.',
|
||||
'HelpFAQ_Cat_Presence_401_head' => 'Un dispositivo se muestra como presente aunque esté "Offline".',
|
||||
'HelpFAQ_Cat_Presence_401_text' => 'Si esto sucede, tiene la posibilidad de eliminar los eventos del dispositivo en cuestión (vista de detalles). Otra posibilidad sería encender el dispositivo y esperar hasta que Pi.Alert reconozca el dispositivo como "online" con el siguiente escaneo
|
||||
y luego simplemente apagar el dispositivo nuevamente. Ahora Pi.Alert debería anotar correctamente el estado del dispositivo en la base de datos con el próximo escaneo.',
|
||||
'HelpFAQ_Cat_Network_600_head' => '¿Para qué sirve esta sección?',
|
||||
'HelpFAQ_Cat_Network_600_text' => 'Esta sección debería ofrecerle la posibilidad de mapear la asignación de sus dispositivos de red. Para ello, puede crear uno o más conmutadores, WLAN, enrutadores, etc., proporcionarles un número de puerto si es necesario y asignarles dispositivos
|
||||
ya detectados. Esta asignación se realiza en la vista detallada del dispositivo a asignar. Por lo tanto, es posible determinar rápidamente a qué puerto está conectado un host y si está en línea. Es posible asignar un dispositivo a múltiples
|
||||
puertos (agrupación de puertos), así como múltiples dispositivos a un puerto (máquinas virtuales).',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Front end events
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'test_event_tooltip' => 'Guarda tus cambios antes de probar nuevos ajustes.',
|
||||
'test_event_icon' => 'fa-vial-circle-check',
|
||||
'run_event_tooltip' => 'Activa el ajuste y guarda tus cambios antes de ejecutarlo.',
|
||||
'run_event_icon' => 'fa-play',
|
||||
'general_event_title' => 'Ejecutar un evento ad-hoc',
|
||||
'general_event_description' => 'El evento que has ejecutado puede tardar un rato mientras finalizan procesos en segundo plano. La ejecución ha terminado cuando ves <code>finalizado</code> abajo. Comprueba el <a onclick=\'setCache(\"activeMaintenanceTab\", \"tab_Logging_id\")\' href=\"/maintenance.php#tab_Logging\">registro de error</a> si no has obtenido el resultado esperado. <br/> <br/> Estado: ',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Plugins
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Plugins_Unprocessed_Events' => 'Eventos sin procesar',
|
||||
'Plugins_Objects' => 'Objetos del Plugin',
|
||||
'Plugins_History' => 'Historial de eventos',
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Settings
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'settings_missing' => 'Actualiza la página, no todos los ajustes se han cargado. Probablemente sea por una sobrecarga de la base de datos.',
|
||||
'settings_missing_block' => 'No puedes guardar los ajustes sin establecer todas las claves. Actualiza la página. Problabmente esté causado por una sobrecarga de la base de datos.',
|
||||
'settings_old' => 'Los ajustes mostrados en esta página están desactualizados. Probablemente sea por un escaneo en proceso. Los ajustes se guardan en el archivo <code>pialert.conf</code>, pero el proceso en segundo plano no las ha importado todavía a la base de datos. Puedes esperar a que los ajustes se actualicen para evitar sobreescribirlos con los ajustes antiguos. Si te da igual perder los ajustes desde la última vez que guardaste y ahora, siéntete libre de guardarlos de nuevo. También hay copias de seguridad creadas si necesitas comparar tus ajustes más tarde.',
|
||||
'settings_imported' => 'Última vez que los ajustes fueron importados desde el archivo pialert.conf:',
|
||||
'settings_expand_all' => 'Expandir todo',
|
||||
|
||||
// General
|
||||
'General_display_name' => 'General',
|
||||
'General_icon' => '<i class="fa fa-gears"></i>',
|
||||
'ENABLE_ARPSCAN_name' => 'Activar escaneo ARP',
|
||||
'ENABLE_ARPSCAN_description' => 'El escaneo Arp es una herramienta de la línea de comandos que usa el protocolo ARP para encontrar e identificar la ip de los dispositivos. Una alternativa a este escaneo sería activar los ajustes de la <a onclick="toggleAllSettings()" href="#PIHOLE_ACTIVE"><code>PIHOLE_ACTIVE</code>integración con PiHole</a>.',
|
||||
'SCAN_SUBNETS_name' => 'Subredes para escanear',
|
||||
'SCAN_SUBNETS_description' => 'El tiempo del escaneo ARP depende del número de ips a comprobar, así que es importante establecer correctamente la máscara y la interfaz de red. Comprueba la <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md" target="_blank">documentación sobre sudredes</a> para obtener ayuda para establecer VLANs, cuáles son soportadas o como averiguar la máscara y la interfaz de red.',
|
||||
'LOG_LEVEL_name' => 'Imprimir registros adicionales',
|
||||
'LOG_LEVEL_description' => 'Esto hará que el registro tenga más información. Util para depurar que eventos se van guardando en la base de datos.',
|
||||
'TIMEZONE_name' => 'Zona horaria',
|
||||
'TIMEZONE_description' => 'La zona horaria para mostrar las estadísticas correctamente. Encuentra tu zona horaria <a target="_blank" href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" rel="nofollow">aquí</a>.',
|
||||
'ENABLE_PLUGINS_name' => 'Habilitar complementos',
|
||||
'ENABLE_PLUGINS_description' => 'Habilita la funcionalidad de los <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins">complementos</a>. Cargar los complementos requiere más recursos de hardware, así que quizás quieras desactivarlo en hardware poco potente.',
|
||||
'PIALERT_WEB_PROTECTION_name' => 'Habilitar inicio de sesión',
|
||||
'PIALERT_WEB_PROTECTION_description' => 'Cuando está habilitado, se muestra un cuadro de diálogo de inicio de sesión. Lea detenidamente a continuación si se le bloquea el acceso a su instancia.',
|
||||
'PIALERT_WEB_PASSWORD_name' => 'Contraseña de inicio de sesión',
|
||||
'PIALERT_WEB_PASSWORD_description' => 'La contraseña predeterminada es <code>123456</code>. Para cambiar la contraseña, ejecute <code>/home/pi/pialert/back/pialert-cli</code> en el contenedor',
|
||||
'INCLUDED_SECTIONS_name' => 'Notificar en',
|
||||
'INCLUDED_SECTIONS_description' => 'Especifica que eventos envían notificaciones. Elimina los tipos de eventos de los que no quieras recibir notificaciones. Este ajuste sobreescribe los ajustes específicos de los dispositivos en la interfaz. (<code>CTRL + Clic</code> para seleccionar / deseleccionar).',
|
||||
'SCAN_CYCLE_MINUTES_name' => 'Retraso del ciclo de escaneo',
|
||||
'SCAN_CYCLE_MINUTES_description' => 'El retraso entre escaneos. Si usa arp-scan, el tiempo de escaneo en sí depende de la cantidad de direcciones IP para verificar. Esto está influenciado por la máscara de red configurada en la configuración <a href="#SCAN_SUBNETS"><code>SCAN_SUBNETS</code></a> en la parte superior. Cada IP toma un par de segundos para escanear.',
|
||||
'DAYS_TO_KEEP_EVENTS_name' => 'Eliminar eventos anteriores a',
|
||||
'DAYS_TO_KEEP_EVENTS_description' => 'Esta es una configuración de mantenimiento. Esto especifica el número de días de entradas de eventos que se guardarán. Todos los eventos anteriores se eliminarán periódicamente.',
|
||||
'REPORT_DASHBOARD_URL_name' => 'URL de Pi.Alert',
|
||||
'REPORT_DASHBOARD_URL_description' => 'Esta URL se utiliza como base para generar enlaces en los correos electrónicos. Ingrese la URL completa que comienza con <code>http://</code>, incluido el número de puerto (sin barra inclinada al final <code>/</code>).',
|
||||
'DIG_GET_IP_ARG_name' => 'Descubrir de IP de Internet',
|
||||
'DIG_GET_IP_ARG_description' => 'Cambie los argumentos de la <a href="https://linux.die.net/man/1/dig" target="_blank">utilidad de dig</a> si tiene problemas para resolver su IP de Internet. Los argumentos se agregan al final del siguiente comando: <code>dig +short </code>.',
|
||||
'UI_LANG_name' => 'Idioma de interfaz',
|
||||
'UI_LANG_description' => 'Seleccione el idioma de interfaz de usuario preferido.',
|
||||
'UI_PRESENCE_name' => 'Mostrar en el gráfico de presencia',
|
||||
'UI_PRESENCE_description' => 'Elige que estados del dispositivo deben mostrarse en la gráfica de <b>Presencia del dispositivo a lo largo del tiempo</b> de la página de <a href="/devices.php" target="_blank">Dispositivos</a>. (<code>CTRL + Clic</code> para seleccionar / deseleccionar)',
|
||||
|
||||
// Email
|
||||
'Email_display_name' => 'Email',
|
||||
'Email_icon' => '<i class="fa fa-at"></i>',
|
||||
'REPORT_MAIL_name' => 'Habilitar email',
|
||||
'REPORT_MAIL_description' => 'Si está habilitado, se envía un correo electrónico con una lista de cambios a los que se ha suscrito. Complete también todas las configuraciones restantes relacionadas con la configuración de SMTP a continuación',
|
||||
'SMTP_SERVER_name' => 'URL del servidor SMTP',
|
||||
'SMTP_SERVER_description' => 'La URL del host del servidor SMTP. Por ejemplo, <code>smtp-relay.sendinblue.com</code>. Para utilizar Gmail como servidor SMTP <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SMTP_GMAIL.md">siga esta guía</a >',
|
||||
'SMTP_PORT_name' => 'Puerto del servidor SMTP',
|
||||
'SMTP_PORT_description' => 'Número de puerto utilizado para la conexión SMTP. Establézcalo en <code>0</code> si no desea utilizar un puerto al conectarse al servidor SMTP.',
|
||||
'SMTP_SKIP_LOGIN_name' => 'Omitir autenticación',
|
||||
'SMTP_SKIP_LOGIN_description' => 'No utilice la autenticación cuando se conecte al servidor SMTP.',
|
||||
'SMTP_USER_name' => 'Nombre de usuario SMTP',
|
||||
'SMTP_USER_description' => 'El nombre de usuario utilizado para iniciar sesión en el servidor SMTP (a veces, una dirección de correo electrónico completa).',
|
||||
'SMTP_PASS_name' => 'Contraseña de SMTP',
|
||||
'SMTP_PASS_description' => 'La contraseña del servidor SMTP.',
|
||||
'SMTP_SKIP_TLS_name' => 'No usar TLS',
|
||||
'SMTP_SKIP_TLS_description' => 'Deshabilite TLS cuando se conecte a su servidor SMTP.',
|
||||
'SMTP_FORCE_SSL_name' => 'Forzar SSL',
|
||||
'SMTP_FORCE_SSL_description' => 'Forzar SSL al conectarse a su servidor SMTP',
|
||||
'REPORT_TO_name' => 'Enviar el email a',
|
||||
'REPORT_TO_description' => 'Dirección de correo electrónico a la que se enviará la notificación.',
|
||||
'REPORT_FROM_name' => 'Asunto del email',
|
||||
'REPORT_FROM_description' => 'Asunto del correo electrónico de notificación.',
|
||||
|
||||
// Webhooks
|
||||
'Webhooks_display_name' => 'Webhooks',
|
||||
'Webhooks_icon' => '<i class="fa fa-circle-nodes"></i>',
|
||||
'REPORT_WEBHOOK_name' => 'Habilitar webhooks',
|
||||
'REPORT_WEBHOOK_description' => 'Habilite webhooks para notificaciones. Los webhooks lo ayudan a conectarse a muchas herramientas de terceros, como IFTTT, Zapier o <a href="https://n8n.io/" target="_blank">n8n</a>, por nombrar algunas. Consulte esta sencilla <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md" target="_blank">guía de n8n aquí</a> para obtener comenzó. Si está habilitado, configure los ajustes relacionados a continuación.',
|
||||
'WEBHOOK_URL_name' => 'URL de destino',
|
||||
'WEBHOOK_URL_description' => 'URL de destino comienza con <code>http://</code> o <code>https://</code>.',
|
||||
'WEBHOOK_PAYLOAD_name' => 'Tipo de carga',
|
||||
'WEBHOOK_PAYLOAD_description' => 'El formato de datos de carga de Webhook para el atributo <code>body</code> > <code>attachments</code> > <code>text</code> en el json de carga. Vea un ejemplo de la carga <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json">aquí</a>. (por ejemplo: para discord use <code>text</code>)',
|
||||
'WEBHOOK_REQUEST_METHOD_name' => 'Método de solicitud',
|
||||
'WEBHOOK_REQUEST_METHOD_description' => 'El método de solicitud HTTP que se utilizará para la llamada de webhook.',
|
||||
'Webhooks_settings_group' => '<i class="fa fa-circle-nodes"></i> Webhooks',
|
||||
|
||||
// Apprise
|
||||
'Apprise_display_name' => 'Apprise',
|
||||
'Apprise_icon' => '<i class="fa fa-bullhorn"></i>',
|
||||
'REPORT_APPRISE_name' => 'Habilitar Apprise',
|
||||
'REPORT_APPRISE_description' => 'Habilitar el envío de notificaciones a través de <a target="_blank" href="https://hub.docker.com/r/caronc/apprise">Apprise</a>.',
|
||||
'APPRISE_HOST_description' => 'Apprise host URL que comienza con <code>http://</code> o <code>https://</code>. (no olvide incluir <code>/notify</code> al final)',
|
||||
'APPRISE_HOST_name' => 'Apprise host URL',
|
||||
'APPRISE_URL_name' => 'URL de notificación de Apprise',
|
||||
'APPRISE_URL_description' => 'Informar de la URL de destino de la notificación. Por ejemplo, para Telegram sería <code>tgram://{bot_token}/{chat_id}</code>.',
|
||||
|
||||
// NTFY
|
||||
'NTFY_display_name' => 'NTFY',
|
||||
'NTFY_icon' => '<i class="fa fa-terminal"></i>',
|
||||
'REPORT_NTFY_name' => 'Habilitar NTFY',
|
||||
'REPORT_NTFY_description' => 'Habilitar el envío de notificaciones a través de <a target="_blank" href="https://ntfy.sh/">NTFY</a>.',
|
||||
'NTFY_HOST_name' => 'NTFY host URL',
|
||||
'NTFY_HOST_description' => 'URL de host NTFY que comienza con <code>http://</code> o <code>https://</code>. Puede usar la instancia alojada en <a target="_blank" href="https://ntfy.sh/">https://ntfy.sh</a> simplemente ingresando <code>https://ntfy. sh</código>.',
|
||||
'NTFY_TOPIC_name' => 'Tema de NTFY',
|
||||
'NTFY_TOPIC_description' => 'Tu tema secreto.',
|
||||
'NTFY_USER_name' => 'Usuario de NTFY',
|
||||
'NTFY_USER_description' => 'Ingrese usuario si necesita (alojar) una instancia con autenticación habilitada.',
|
||||
'NTFY_PASSWORD_name' => 'Contraseña de NTFY',
|
||||
'NTFY_PASSWORD_description' => 'Ingrese la contraseña si necesita (host) una instancia con autenticación habilitada.',
|
||||
|
||||
// Pushsafer
|
||||
'PUSHSAFER_display_name' => 'Pushsafer',
|
||||
'PUSHSAFER_icon' => '<i class="fa fa-bell"></i>',
|
||||
'REPORT_PUSHSAFER_name' => 'Habilitar Pushsafer',
|
||||
'REPORT_PUSHSAFER_description' => 'Habilitar el envío de notificaciones a través de <a target="_blank" href="https://www.pushsafer.com/">Pushsafer</a>.',
|
||||
'PUSHSAFER_TOKEN_name' => 'Token de Pushsafer',
|
||||
'PUSHSAFER_TOKEN_description' => 'Su clave secreta de la API de Pushsafer (token).',
|
||||
'APPRISE_PAYLOAD_name' => 'Tipo de carga',
|
||||
'APPRISE_PAYLOAD_description' => 'Seleccione el tipo de carga útil enviada a Apprise. Por ejemplo, <code>html</code> funciona bien con correos electrónicos, <code>text</code> con aplicaciones de chat, como Telegram.',
|
||||
|
||||
// MQTT
|
||||
'MQTT_display_name' => 'MQTT',
|
||||
'MQTT_icon' => '<i class="fa fa-square-rss"></i>',
|
||||
'REPORT_MQTT_name' => 'Habilitar MQTT',
|
||||
'REPORT_MQTT_description' => 'Habilitar el envío de notificaciones a través de <a target="_blank" href="https://www.home-assistant.io/integrations/mqtt/">MQTT</a> a su Home Assistance.',
|
||||
'MQTT_BROKER_name' => 'URL del broker MQTT',
|
||||
'MQTT_BROKER_description' => 'URL del host MQTT (no incluya <code>http://</code> o <code>https://</code>).',
|
||||
'MQTT_PORT_name' => 'Puerto del broker MQTT',
|
||||
'MQTT_PORT_description' => 'Puerto donde escucha el broker MQTT. Normalmente <code>1883</code>.',
|
||||
'MQTT_USER_name' => 'Usuario de MQTT',
|
||||
'MQTT_USER_description' => 'Nombre de usuario utilizado para iniciar sesión en su instancia de agente de MQTT.',
|
||||
'MQTT_PASSWORD_name' => 'Contraseña de MQTT',
|
||||
'MQTT_PASSWORD_description' => 'Contraseña utilizada para iniciar sesión en su instancia de agente de MQTT.',
|
||||
'MQTT_QOS_name' => 'Calidad de servicio MQTT',
|
||||
'MQTT_QOS_description' => 'Configuración de calidad de servicio para el envío de mensajes MQTT. <code>0</code>: baja calidad a <code>2</code>: alta calidad. Cuanto mayor sea la calidad, mayor será el retraso.',
|
||||
'MQTT_DELAY_SEC_name' => 'Retraso de MQTT por dispositivo',
|
||||
'MQTT_DELAY_SEC_description' => 'Un pequeño truco: retrase la adición a la cola en caso de que el proceso se reinicie y los procesos de publicación anteriores se anulen (se necesitan ~<code>2</code>s para actualizar la configuración de un sensor en el intermediario). Probado con <code>2</code>-<code>3</code> segundos de retraso. Este retraso solo se aplica cuando se crean dispositivos (durante el primer bucle de notificación). No afecta los escaneos o notificaciones posteriores.',
|
||||
|
||||
//DYNDNS
|
||||
'DynDNS_display_name' => 'DynDNS',
|
||||
'DynDNS_icon' => '<i class="fa fa-globe"></i>',
|
||||
'DDNS_ACTIVE_name' => 'Habilitar DynDNS',
|
||||
'DDNS_ACTIVE_description' => '',
|
||||
'DDNS_DOMAIN_name' => 'URL del dominio DynDNS',
|
||||
'DDNS_DOMAIN_description' => '',
|
||||
'DDNS_USER_name' => 'Usuario de DynDNS',
|
||||
'DDNS_USER_description' => '',
|
||||
'DDNS_PASSWORD_name' => 'Contraseña de DynDNS',
|
||||
'DDNS_PASSWORD_description' => '',
|
||||
'DDNS_UPDATE_URL_name' => 'URL de actualización de DynDNS',
|
||||
'DDNS_UPDATE_URL_description' => 'Actualice la URL que comienza con <code>http://</code> o <code>https://</code>.',
|
||||
|
||||
// PiHole
|
||||
'PiHole_display_name' => 'PiHole',
|
||||
'PiHole_icon' => '<i class="fa fa-seedling"></i>',
|
||||
'PIHOLE_ACTIVE_name' => 'Habilitar el mapeo de PiHole',
|
||||
'PIHOLE_ACTIVE_description' => 'Debe mapear <code>:/etc/pihole/pihole-FTL.db</code> en el archivo <code>docker-compose.yml</code> si habilita esta configuración.',
|
||||
'DHCP_ACTIVE_name' => 'Habilitar PiHole DHCP',
|
||||
'DHCP_ACTIVE_description' => 'Debe asignar <code>:/etc/pihole/dhcp.leases</code> en el archivo <code>docker-compose.yml</code> si habilita esta configuración.',
|
||||
|
||||
// Pholus
|
||||
'Pholus_display_name' => 'Pholus',
|
||||
'Pholus_icon' => '<i class="fa fa-search"></i>',
|
||||
'PHOLUS_ACTIVE_name' => 'Ejecución del ciclo',
|
||||
'PHOLUS_ACTIVE_description' => '<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/pholus" target="_blank" >Pholus</a> es una herramienta de rastreo para descubrir información adicional sobre los dispositivos en la red, incluido el nombre del dispositivo. Si está habilitado, ejecutará el escaneo antes de cada ciclo de escaneo de red hasta que no haya dispositivos <code>(unknown)</code> o <code>(name not found)</code>. Tenga en cuenta que puede enviar spam a la red con tráfico innecesario. Depende de la configuración de <a onclick="toggleAllSettings()" href="#SCAN_SUBNETS"><code>SCAN_SUBNETS</code></a>. Para un análisis programado o único, verifique la configuración de <a href="#PHOLUS_RUN"><code>PHOLUS_RUN</code></a>.',
|
||||
'PHOLUS_TIMEOUT_name' => 'Tiempo de espera de ciclo',
|
||||
'PHOLUS_TIMEOUT_description' => '¿Cuánto tiempo en segundos debe rastrear Pholus en cada interfaz si se cumple la condición anterior? Cuanto más tiempo lo deje encendido, es más probable que los dispositivos transmitan más información. Este tiempo de espera se suma al tiempo que lleva realizar un escaneo arp en su red.',
|
||||
'PHOLUS_FORCE_name' => 'Escaneo de fuerza de ciclo',
|
||||
'PHOLUS_FORCE_description' => 'Fuerce el escaneo de cada escaneo de red, incluso si no hay dispositivos <code>(unknown)</code> o <code>(name not found)</code>. Tenga cuidado al habilitar esto, ya que la detección puede inundar fácilmente su red.',
|
||||
'PHOLUS_RUN_name' => 'Ejecución programada',
|
||||
'PHOLUS_RUN_description' => 'Habilite un escaneo regular de Pholus en su red. Los ajustes de programación se pueden encontrar a continuación. Si selecciona <code>una vez</code>, Pholus se ejecuta solo una vez al inicio durante el tiempo especificado en la configuración de <a href="#PHOLUS_RUN_TIMEOUT"><code>PHOLUS_RUN_TIMEOUT</code></a>.',
|
||||
'PHOLUS_RUN_TIMEOUT_name' => 'Tiempo de espera de ejecución programado',
|
||||
'PHOLUS_RUN_TIMEOUT_description' => 'El tiempo de espera en segundos para el escaneo Pholus programado. Se aplican las mismas notas con respecto a la duración que en la configuración de <a href="#PHOLUS_TIMEOUT"><code>PHOLUS_TIMEOUT</code></a>. Un escaneo programado no verifica si hay dispositivos <code>(unknown)</code> o <code>(name not found)</code>, el escaneo se ejecuta de cualquier manera.',
|
||||
'PHOLUS_RUN_SCHD_name' => 'Programar',
|
||||
'PHOLUS_RUN_SCHD_description' => 'Solo está habilitado si selecciona <code>programar</code> en la configuración de <a href="#PHOLUS_RUN"><code>PHOLUS_RUN</code></a>. Asegúrese de ingresar el horario en el formato similar a cron correcto
|
||||
(por ejemplo, validar en <a href="https://crontab.guru/" target="_blank">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 am en el <a onclick="toggleAllSettings()" href="#TIMEZONE"><code>TIMEZONE</code> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo.',
|
||||
'PHOLUS_DAYS_DATA_name' => 'Retención de datos',
|
||||
'PHOLUS_DAYS_DATA_description' => 'Cuántos días de entradas de escaneo de Pholus deben conservarse (globalmente, ¡no específico del dispositivo!). El archivo <a href="/maintenance.php#tab_Logging">pialert_pholus.log</a> no se modifica. Introduzca <code>0</code> para desactivar.',
|
||||
|
||||
// NMAP
|
||||
'Nmap_display_name' => 'Nmap',
|
||||
'Nmap_icon' => '<i class="fa fa-ethernet"></i>',
|
||||
'NMAP_ACTIVE_name' => 'Ejecución del ciclo',
|
||||
'NMAP_ACTIVE_description' => 'Si está habilitado, ejecutará un escaneo en un dispositivo recién encontrado. Para un análisis programado o único, verifique la configuración de <a href="#NMAP_RUN"><code>NMAP_RUN</code></a>.',
|
||||
'PHOLUS_TIMEOUT_name' => 'Tiempo de espera de ciclo',
|
||||
'NMAP_TIMEOUT_description' => 'Tiempo máximo en segundos para esperar a que finalice un escaneo de Nmap en cualquier dispositivo.',
|
||||
'NMAP_RUN_name' => 'Ejecución programada',
|
||||
'NMAP_RUN_description' => 'Habilite un escaneo regular de Nmap en su red en todos los dispositivos. Los ajustes de programación se pueden encontrar a continuación. Si selecciona <code>una vez</code>, Nmap se ejecuta solo una vez al inicio durante el tiempo especificado en la configuración de <a href="#NMAP_TIMEOUT"><code>NMAP_TIMEOUT</code></a>.',
|
||||
'NMAP_RUN_SCHD_name' => 'Programar',
|
||||
'NMAP_RUN_SCHD_description' => 'Solo está habilitado si selecciona <code>programar</code> en la configuración de <a href="#NMAP_RUN"><code>NMAP_RUN</code></a>. Asegúrese de ingresar el cronograma en el formato tipo cron correcto.',
|
||||
'NMAP_ARGS_name' => 'Argumentos',
|
||||
'NMAP_ARGS_description' => 'Argumentos utilizados para ejecutar el análisis de Nmap. Tenga cuidado de especificar <a href="https://linux.die.net/man/1/nmap" target="_blank">los argumentos</a> correctamente. Por ejemplo, <code>-p -10000</code> escanea los puertos del 1 al 10000.',
|
||||
|
||||
//API
|
||||
'API_display_name' => 'API',
|
||||
'API_icon' => '<i class="fa fa-arrow-down-up-across-line"></i>',
|
||||
'API_CUSTOM_SQL_name' => 'Endpoint personalizado',
|
||||
'API_CUSTOM_SQL_description' => 'Puede especificar una consulta SQL personalizada que generará un archivo JSON y luego lo expondrá a través del <a href="/api/table_custom_endpoint.json" target="_blank">archivo <code>table_custom_endpoint.json</code ></a>.',
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -18,54 +18,88 @@ switch($result){
|
||||
|
||||
if (isset($pia_lang_selected) == FALSE or (strlen($pia_lang_selected) == 0)) {$pia_lang_selected = $defaultLang;}
|
||||
|
||||
//Language_Strings ("Language_Code", "String_Key", "String_Value", "Extra")
|
||||
$result = $db->query("SELECT * FROM Plugins_Language_Strings");
|
||||
require dirname(__FILE__).'/../skinUI.php';
|
||||
|
||||
// array
|
||||
$result = $db->query("SELECT * FROM Plugins_Language_Strings");
|
||||
$strings = array();
|
||||
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
|
||||
// Push row data
|
||||
$strings[] = array( 'Language_Code' => $row['Language_Code'],
|
||||
'String_Key' => $row['String_Key'],
|
||||
'String_Value' => $row['String_Value'],
|
||||
'Extra' => $row['Extra']
|
||||
);
|
||||
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
|
||||
$strings[$row['String_Key']] = $row['String_Value'];
|
||||
}
|
||||
|
||||
require dirname(__FILE__).'/../skinUI.php';
|
||||
require dirname(__FILE__).'/en_us.php';
|
||||
require dirname(__FILE__).'/de_de.php';
|
||||
require dirname(__FILE__).'/es_es.php';
|
||||
|
||||
function getLanguageDataFromJson()
|
||||
{
|
||||
global $allLanguages;
|
||||
|
||||
// Default language
|
||||
$defaultLanguage = 'en_us';
|
||||
|
||||
// Array to hold the language data from the JSON files
|
||||
$languageData = [];
|
||||
|
||||
foreach ($allLanguages as $language) {
|
||||
// Load and parse the JSON data from .json files
|
||||
$jsonFilePath = dirname(__FILE__) . '/' . $language . '.json';
|
||||
|
||||
if (file_exists($jsonFilePath)) {
|
||||
$data = json_decode(file_get_contents($jsonFilePath), true);
|
||||
|
||||
// Use the default language if the key is not found
|
||||
$languageData[$language] = $data[$language] ?? $data[$defaultLanguage] ?? [];
|
||||
} else {
|
||||
// Handle the case where the JSON file doesn't exist
|
||||
// For example, you might want to log an error message
|
||||
echo 'File not found: '.$jsonFilePath;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $languageData;
|
||||
}
|
||||
|
||||
|
||||
// Merge the JSON data with the SQL data, giving priority to SQL data for overlapping keys
|
||||
function mergeLanguageData($jsonLanguageData, $sqlLanguageData)
|
||||
{
|
||||
// Loop through the JSON language data and check for overlapping keys
|
||||
foreach ($jsonLanguageData as $languageCode => $languageStrings) {
|
||||
foreach ($languageStrings as $key => $value) {
|
||||
// Check if the key exists in the SQL data, if yes, use the SQL value
|
||||
if (isset($sqlLanguageData[$key])) {
|
||||
$jsonLanguageData[$languageCode][$key] = $sqlLanguageData[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $jsonLanguageData;
|
||||
}
|
||||
|
||||
function lang($key)
|
||||
{
|
||||
global $pia_lang_selected, $lang, $defaultLang, $strings;
|
||||
global $pia_lang_selected, $lang, $defaultLang, $strings, $db;
|
||||
// Get the data from JSON files
|
||||
$languageData = getLanguageDataFromJson();
|
||||
|
||||
// get strings from the DB and append them to the ones from the files
|
||||
foreach ($strings as $string)
|
||||
{
|
||||
$lang[$string["Language_Code"]][$string["String_Key"]] = $string["String_Value"];
|
||||
// Get the data from SQL query
|
||||
$sqlLanguageData = $strings;
|
||||
|
||||
// Merge JSON data with SQL data
|
||||
$mergedLanguageData = mergeLanguageData($languageData, $sqlLanguageData);
|
||||
|
||||
// Check if the key exists in the selected language
|
||||
if (isset($mergedLanguageData[$pia_lang_selected][$key])) {
|
||||
$result = $mergedLanguageData[$pia_lang_selected][$key];
|
||||
} else {
|
||||
// If key not found in selected language, use "en_us" as fallback
|
||||
if (isset($mergedLanguageData['en_us'][$key])) {
|
||||
$result = $mergedLanguageData['en_us'][$key];
|
||||
} else {
|
||||
// If key not found in "en_us" either, use a default string
|
||||
$result = "String Not found for key " . $key;
|
||||
}
|
||||
}
|
||||
|
||||
// check if key exists in selected language
|
||||
if(array_key_exists($key, $lang[$pia_lang_selected]) == FALSE)
|
||||
{
|
||||
// check if key exists in the default language if not available in the selected
|
||||
if (array_key_exists($key, $lang[$defaultLang]) == TRUE)
|
||||
{
|
||||
// if found, use default language
|
||||
$temp = $lang[$defaultLang][$key];
|
||||
|
||||
} else
|
||||
{
|
||||
// String not found in the default or selected language
|
||||
$temp = "String not found for key: ".$key;
|
||||
}
|
||||
} else
|
||||
{
|
||||
// use selected language translation
|
||||
$temp = $lang[$pia_lang_selected][$key];
|
||||
}
|
||||
|
||||
return $temp;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
21
front/php/templates/version.php
Executable file
21
front/php/templates/version.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# version.php - Templates module Template to display the current version #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
|
||||
$filename = "/home/pi/pialert/.VERSION";
|
||||
if(file_exists($filename)) {
|
||||
echo file_get_contents($filename);
|
||||
}
|
||||
else{
|
||||
echo "File not found";
|
||||
}
|
||||
?>
|
||||
@@ -1,19 +1,47 @@
|
||||
## 📚 Docs for individual plugins
|
||||
|
||||
### Script based plugins
|
||||
### 🏴 Community translations of this file
|
||||
|
||||
- [website_monitor (WEBMON)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/website_monitor/)
|
||||
- [dhcp_servers (DHCPSRVS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_servers/)
|
||||
- [dhcp_leases (DHCPLSS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_leases/)
|
||||
- [unifi_import (UNFIMP)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/unifi_import/)
|
||||
- [snmp_discovery (SNMPDSC)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/snmp_discovery/)
|
||||
- [undiscoverables (UNDIS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/)
|
||||
> Please note there might be a delay between English and community translations.
|
||||
|
||||
### SQL query based plugins
|
||||
- [nmap_services (NMAPSERV)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/nmap_services/)
|
||||
* <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README_ES.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/es.svg" alt="README_ES.md" style="height: 20px !important;width: 20px !important;"> Spanish (Spain)
|
||||
</a>
|
||||
|
||||
### template based plugins
|
||||
- [newdev_template (NEWDEV)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/newdev_template/)
|
||||
* <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README_DE.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/de.svg" alt="README_DE.md" style="height: 20px !important;width: 20px !important;"> German (Germany)
|
||||
</a>
|
||||
|
||||
### 🔌 Plugins & 📚 Docs
|
||||
|
||||
| Required | CurrentScan | Unique Prefix | Plugin Type | Link + Docs |
|
||||
|-------------|-------------|-----------------------|------------------------|----------------------------------------------------------|
|
||||
| | Yes | ARPSCAN | Script | 📚[arp_scan](/front/plugins/arp_scan/) |
|
||||
| | | CSVBCKP | Script | 📚[csv_backup](/front/plugins/csv_backup/) |
|
||||
| Yes* | | DBCLNP | Script | 📚[db_cleanup](/front/plugins/db_cleanup/) |
|
||||
| | | DDNS | Script | 📚[ddns_update](/front/plugins/ddns_update/) |
|
||||
| | Yes | DHCPLSS | Script | 📚[dhcp_leases](/front/plugins/dhcp_leases/) |
|
||||
| | | DHCPSRVS | Script | 📚[dhcp_servers](/front/plugins/dhcp_servers/) |
|
||||
| | Yes | INTRNT | Script | 📚[internet_ip](/front/plugins/internet_ip/) |
|
||||
| Yes | | NEWDEV | Template | 📚[newdev_template](/front/plugins/newdev_template/) |
|
||||
| | | NMAP | Script | 📚[nmap_scan](/front/plugins/nmap_scan/) |
|
||||
| | Yes | PIHOLE | External SQLite DB | 📚[pihole_scan](/front/plugins/pihole_scan/) |
|
||||
| | | SETPWD | Script | 📚[set_password](/front/plugins/set_password/) |
|
||||
| | | SNMPDSC | Script | 📚[snmp_discovery](/front/plugins/snmp_discovery/) |
|
||||
| | Yes* | UNDIS | Script | 📚[undiscoverables](/front/plugins/undiscoverables/) |
|
||||
| | Yes | UNFIMP | Script | 📚[unifi_import](/front/plugins/unifi_import/) |
|
||||
| | | VNDRPDT | Script | 📚[vendor_update](/front/plugins/vendor_update/) |
|
||||
| | | WEBMON | Script | 📚[website_monitor](/front/plugins/website_monitor/) |
|
||||
| N/A | | N/A | SQL query | N/A, but the External SQLite DB plugins work similar |
|
||||
|
||||
> \* The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices.
|
||||
>
|
||||
> \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed.
|
||||
|
||||
> [!NOTE]
|
||||
> You soft-disable plugins via Settings or completely ignore plugins by placing a `ignore_plugin` file into the plugin directory. The difference is that ignored plugins don't show up anywhere in the UI (Settings, Device details, Plugins pages). The app skips ignored plugins completely. Device-detecting plugins insert values into the `CurrentScan` database table. The plugins that are not required are safe to ignore, however it makes sense to have a least some device-detecting plugins (that insert entries into the `CurrentScan` table) enabled, such as ARPSCAN or PIHOLE.
|
||||
|
||||
> It's recommended to use the same schedule interval for all plugins responsible for discovering new devices.
|
||||
|
||||
## 🌟 Create a custom plugin: Overview
|
||||
|
||||
@@ -38,7 +66,7 @@ Example use cases for plugins could be:
|
||||
* Creating ad-hoc UI tables from existing data in the PiAlert database, e.g. to show all open ports on devices, to list devices that disconnected in the last hour, etc.
|
||||
* Using other device discovery methods on the network and importing the data as new devices
|
||||
* Creating a script to create FAKE devices based on user input via custom settings
|
||||
* ...at this point the limitation is mostly the creativity than the capability (there might be edge cases and a need to support more form controls for user input off custom settings, but you probably get the idea)
|
||||
* ...at this point the limitation is mostly the creativity rather than the capability (there might be edge cases and a need to support more form controls for user input off custom settings, but you probably get the idea)
|
||||
|
||||
If you wish to develop a plugin, please check the existing plugin structure. Once the settings are saved by the user they need to be removed from the `pialert.conf` file manually if you want to re-initialize them from the `config.json` of the plugin.
|
||||
|
||||
@@ -46,10 +74,10 @@ Again, please read the below carefully if you'd like to contribute with a plugin
|
||||
|
||||
## ⚠ Disclaimer
|
||||
|
||||
Follow the below very carefully and check example plugin(s) if you'd like to write one yourself. Plugin UI is not my priority right now, happy to approve PRs if you are interested in extending/improving the UI experience. Example improvements for the taking:
|
||||
Follow the below very carefully and check example plugin(s) if you'd like to write one yourself. Plugin UI is not my priority right now, happy to approve PRs if you are interested in extending/improving the UI experience (See [Frontend guidelines](/docs/FRONTEND_DEVELOPMENT.md)). Example improvements for the taking:
|
||||
|
||||
* Making the tables sortable/filterable
|
||||
* Using the same approach to display table data as in the Devices section (solves above)
|
||||
* Using the same approach to display table data as in the Devices section (solves above)
|
||||
* Adding form controls supported to display the data (Currently supported ones are listed in the section "UI settings in database_column_definitions" below)
|
||||
* ...
|
||||
|
||||
@@ -57,22 +85,22 @@ Follow the below very carefully and check example plugin(s) if you'd like to wri
|
||||
|
||||
These issues will be hopefully fixed with time, so please don't report them. Instead, if you know how, feel free to investigate and submit a PR to fix the below. Keep the PRs small as it's easier to approve them:
|
||||
|
||||
* Existing plugin objects sometimes not interpreted correctly and a new object is created instead, resulting in duplicate entries.
|
||||
* Existing plugin objects sometimes not interpreted correctly and a new object is created instead, resulting in duplicate entries. (race condition?)
|
||||
* Occasional (experienced twice) hanging of processing plugin script file.
|
||||
UI displays outdated values until the API endpoints get refreshed.
|
||||
|
||||
## Plugin file structure overview
|
||||
|
||||
> Folder name must be the same as the code name value in: `"code_name": "<value>"`
|
||||
> ⚠️Folder name must be the same as the code name value in: `"code_name": "<value>"`
|
||||
> Unique prefix needs to be unique compared to the other settings prefixes, e.g.: the prefix `APPRISE` is already in use.
|
||||
|
||||
| File | Required (plugin type) | Description |
|
||||
|----------------------|----------------------|----------------------|
|
||||
| `config.json` | yes | Contains the plugin configuration (manifest) including the settings available to the user. |
|
||||
| `script.py` | yes (script) | The Python script itself |
|
||||
| `last_result.log` | yes (script) | The file used to interface between PiAlert and the plugin (script). |
|
||||
| `script.py` | no | The Python script itself. You may call any valid linux command. |
|
||||
| `last_result.log` | no | The file used to interface between PiAlert and the plugin. Required for a script plugin if you want to feed data into the app. |
|
||||
| `script.log` | no | Logging output (recommended) |
|
||||
| `README.md` | no | Any setup considerations or overview (recommended) |
|
||||
| `README.md` | yes | Any setup considerations or overview |
|
||||
|
||||
More on specifics below.
|
||||
|
||||
@@ -90,40 +118,52 @@ More on specifics below.
|
||||
| 7 | `Extra` | no | Any other data you want to pass and display in PiAlert and the notifications |
|
||||
| 8 | `ForeignKey` | no | A foreign key that can be used to link to the parent object (usually a MAC address) |
|
||||
|
||||
> [!NOTE]
|
||||
> De-duplication is run once an hour on the `Plugins_Objects` database table and duplicate entries with the same value in columns `Object_PrimaryID`, `Object_SecondaryID`, `Plugin` (auto-filled based on `unique_prefix` of the plugin), `UserData` (can be populated with the `"type": "textbox_save"` column type) are removed.
|
||||
|
||||
# config.json structure
|
||||
|
||||
## Supported data sources
|
||||
|
||||
Currently, only 3 data sources are supported (valid `data_source` value).
|
||||
Currently, these data sources are supported (valid `data_source` value).
|
||||
|
||||
| Name | `data_source` value | Needs to return a "table" | Overview (more details on this page below) |
|
||||
|----------------------|----------------------|----------------------|----------------------|
|
||||
| Script | `script` | no | Executes any linux command in the `CMD` setting. |
|
||||
| Pialert DB query | `pialert-db-query` | yes | Executes a SQL query on the PiAlert database in the `CMD` setting. |
|
||||
| Template | `template` | no | Used to generate internal settings, such as default values. |
|
||||
| External SQLite DB query | `sqlite-db-query` | yes | Executes a SQL query from the `CMD` setting on an external SQLite database mapped in the `DB_PATH` setting. |
|
||||
|
||||
- Script (`python-script`)
|
||||
- SQL query on the PiAlert database (`pialert-db-query`)
|
||||
- Template (`template`)
|
||||
|
||||
> 🔎Example
|
||||
>```json
|
||||
>"data_source": "pialert-db-query"
|
||||
>```
|
||||
Any of the above data sources have to return a "table" of the exact structure as outlined above.
|
||||
If you want to display plugin objects or import devices into the app, data sources have to return a "table" of the exact structure as outlined above.
|
||||
|
||||
### "data_source": "python-script"
|
||||
You can show or hide the UI on the "Plugins" page and "Plugins" tab for a plugin on devices via the `show_ui` property:
|
||||
|
||||
If the `data_source` is set to `python-script` the `CMD` setting (that you specify in the `settings` array section in the `config.json`) needs to contain an executable Linux command, that generates a `last_result.log` file. This file needs to be stored in the same folder as the plugin.
|
||||
> 🔎Example
|
||||
>```json
|
||||
> "show_ui": true,
|
||||
> ```
|
||||
|
||||
### "data_source": "script"
|
||||
|
||||
If the `data_source` is set to `script` the `CMD` setting (that you specify in the `settings` array section in the `config.json`) contains an executable Linux command, that usually generates a `last_result.log` file (not required if you don't import any data into the app). This file needs to be stored in the same folder as the plugin.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> A lot of the work is taken care of by the [`plugin_helper.py` library](/front/plugins/plugin_helper.py). You don't need to manage the `last_result.log` file if using the helper objects. Check other `script.py` of other plugins for details (The [Undicoverables plugins `script.py` file](/front/plugins/undiscoverables/script.py) is a good example).
|
||||
|
||||
The content of the `last_result.log` file needs to contain the columns as defined in the "Column order and values" section above. The order of columns can't be changed. After every scan it should contain only the results from the latest scan/execution.
|
||||
|
||||
- The format of the `last_result.log` is a `csv`-like file with the pipe `|` as a separator.
|
||||
- 9 (nine) values need to be supplied, so every line needs to contain 8 pipe separators. Empty values are represented by `null`.
|
||||
- Don't render "headers" for these "columns".
|
||||
- Every scan result / event entry needs to be on a new line.
|
||||
Every scan result/event entry needs to be on a new line.
|
||||
- You can find which "columns" need to be present, and if the value is required or optional, in the "Column order and values" section.
|
||||
- The order of these "columns" can't be changed.
|
||||
|
||||
### 👍 Python script.py tips
|
||||
|
||||
The [Undicoverables plugins `script.py` file](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/script.py) is a good and simple example to start with if you are considering creating a custom plugin. It uses the [`plugin_helper.py` library](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/plugin_helper.py) that significantly simplifies the creation of your custom script.
|
||||
|
||||
#### 🔎 last_result.log examples
|
||||
|
||||
Valid CSV:
|
||||
@@ -200,9 +240,59 @@ This SQL query is executed on the `pialert.db` SQLite database file.
|
||||
|
||||
Used to initialize internal settings. Check the `newdev_template` plugin for details.
|
||||
|
||||
### "data_source": "sqlite-db-query"
|
||||
|
||||
You can execute a SQL query on an external database connected to the current PiALert database via a temporary `EXTERNAL_<unique prefix>.` prefix. For example for `PIHOLE` (`"unique_prefix": "PIHOLE"`) it is `EXTERNAL_PIHOLE.`. The external SQLite database file has to be mapped in the container to the path specified in the `DB_PATH` setting:
|
||||
|
||||
> 🔎Example
|
||||
>
|
||||
>```json
|
||||
> ...
|
||||
>{
|
||||
> "function": "DB_PATH",
|
||||
> "type": "readonly",
|
||||
> "default_value":"/etc/pihole/pihole-FTL.db",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "DB Path"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "Required setting for the <code>sqlite-db-query</code> plugin type. Is used to mount an external SQLite database and execute the SQL query stored in the <code>CMD</code> setting."
|
||||
> }]
|
||||
> }
|
||||
> ...
|
||||
>```
|
||||
|
||||
The actual SQL query you want to execute is then stored as a `CMD` setting, similar to the `pialert-db-query` plugin type The format has to adhere to the format outlined in the "Column order and values" section above.
|
||||
|
||||
> 🔎Example
|
||||
>
|
||||
> Notice the `EXTERNAL_PIHOLE.` prefix.
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "function": "CMD",
|
||||
> "type": "text",
|
||||
> "default_value":"SELECT hwaddr as Object_PrimaryID, cast('http://' || (SELECT ip FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1) as VARCHAR(100)) || ':' || cast( SUBSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1), 0, INSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1), '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, macVendor as Watched_Value1, lastQuery as Watched_Value2, (SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1) as Watched_Value3, 'null' as Watched_Value4, '' as Extra, hwaddr as ForeignKey FROM EXTERNAL_PIHOLE.network WHERE hwaddr NOT LIKE 'ip-%' AND hwaddr <> '00:00:00:00:00:00'; ",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "SQL to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "This SQL query is used to populate the coresponding UI tables under the Plugins section. This particular one selects data from a mapped PiHole SQLite database and maps it to the corresponding Plugin columns."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
## 🕳 Filters
|
||||
|
||||
Plugin entries can be filtered based on values entered into filter fields. The `txtMacFilter` textbox/field contains the Mac address of the currently viewed device or simply a Mac address that's available in the `mac` query string.
|
||||
Plugin entries can be filtered in the UI based on values entered into filter fields. The `txtMacFilter` textbox/field contains the Mac address of the currently viewed device or simply a Mac address that's available in the `mac` query string.
|
||||
|
||||
| Property | Required | Description |
|
||||
|----------------------|----------------------|----------------------|
|
||||
@@ -212,6 +302,7 @@ Plugin entries can be filtered based on values entered into filter fields. The `
|
||||
| `compare_js_template` | yes | JavaScript code used to convert left and right side of the equation. `{value}` is replaced with input values. |
|
||||
| `compare_use_quotes` | yes | If `true` then the end result of the `compare_js_template` i swrapped in `"` quotes. Use to compare strings. |
|
||||
|
||||
Filters are only applied if a filter is specified and the `txtMacFilter` is not `undefined` or empty (`--`).
|
||||
|
||||
> 🔎Example:
|
||||
>
|
||||
@@ -226,70 +317,102 @@ Plugin entries can be filtered based on values entered into filter fields. The `
|
||||
> }
|
||||
> ],
|
||||
> ```
|
||||
>
|
||||
>1. On the `pluginsCore.php` page is an input field with the `txtMacFilter` id:
|
||||
>
|
||||
>```html
|
||||
><input class="form-control" id="txtMacFilter" type="text" value="--">
|
||||
>```
|
||||
>
|
||||
>2. This input field is initialized via the `&mac=` query string.
|
||||
>
|
||||
>3. The app then proceeds to use this Mac value from this field and compares it to the value of the `Object_PrimaryID` database field. The `compare_operator` is `==`.
|
||||
>
|
||||
>4. Both values, from the database field `Object_PrimaryID` and from the `txtMacFilter` are wrapped and evaluated with the `compare_js_template`, that is `'{value}.toString()'`.
|
||||
>
|
||||
>5. `compare_use_quotes` is set to `true` so `'{value}'.toString()` is wrappe dinto `"` quotes.
|
||||
>
|
||||
>6. This results in for example this code:
|
||||
>
|
||||
>```javascript
|
||||
> // left part of teh expression coming from compare_column and right from the input field
|
||||
> // notice the added quotes ()") around the left and right part of teh expression
|
||||
> "eval('ac:82:ac:82:ac:82".toString()')" == "eval('ac:82:ac:82:ac:82".toString()')"
|
||||
>```
|
||||
>
|
||||
|
||||
1. On the `pluginsCore.php` page is an input field with the `txtMacFilter` id:
|
||||
|
||||
```html
|
||||
<input class="form-control" id="txtMacFilter" type="text" value="--">
|
||||
```
|
||||
|
||||
2. This input field is initialized via the `&mac=` query string.
|
||||
|
||||
3. The app then proceeds to use this Mac value from this field and compares it to the value of the `Object_PrimaryID` database field. The `compare_operator` is `==`.
|
||||
|
||||
4. Both values, from the database field `Object_PrimaryID` and from the `txtMacFilter` are wrapped and evaluated with the `compare_js_template`, that is `'{value}.toString()'`.
|
||||
|
||||
5. `compare_use_quotes` is set to `true` so `'{value}'.toString()` is wrappe dinto `"` quotes.
|
||||
|
||||
6. This results in for example this code:
|
||||
|
||||
```javascript
|
||||
// left part of teh expression coming from compare_column and right from the input field
|
||||
// notice the added quotes ()") around the left and right part of teh expression
|
||||
"eval('ac:82:ac:82:ac:82".toString()')" == "eval('ac:82:ac:82:ac:82".toString()')"
|
||||
```
|
||||
|
||||
7. Filters are only applied if a filter is specified and the `txtMacFilter` is not `undefined` or empty (`--`).
|
||||
|
||||
### 🗺 Mapping the plugin results into a database table
|
||||
|
||||
PiAlert will take the results of the plugin execution and insert these results into a database table, if a plugin contains the property `"mapped_to_table"` in the `config.json` root. The mapping of the columns is defined in the `database_column_definitions` array.
|
||||
Plugin results are always inserted into the standard `Plugin_Objects` database table. Optionally, PiAlert can take the results of the plugin execution and insert these results into an additional database table. This is enabled by with the property `"mapped_to_table"` in the `config.json` file. The mapping of the columns is defined in the `database_column_definitions` array.
|
||||
|
||||
This approach is used to implement the `DHCPLSS` plugin. The script parses all supplied "dhcp.leases" files, get's the results in the generic table format outlined in the "Column order and values" section above and takes individual values and inserts them into the `"DHCP_Leases"` database table in the PiAlert database. All this is achieved by:
|
||||
> [!NOTE]
|
||||
> If results are mapped to the `CurrentScan` table, the data is then included into the regular scan loop, so for example notification for devices are sent out.
|
||||
|
||||
1) Specifying the database table into which the results are inserted by defining `"mapped_to_table": "DHCP_Leases"` in the root of the `config.json` file as shown below:
|
||||
|
||||
```json
|
||||
{
|
||||
"code_name": "dhcp_leases",
|
||||
"unique_prefix": "DHCPLSS",
|
||||
...
|
||||
"data_source": "python-script",
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"mapped_to_table": "DHCP_Leases",
|
||||
...
|
||||
}
|
||||
```
|
||||
2) Defining the target column with the `mapped_to_column` property for individual columns in the `database_column_definitions` array of the `config.json` file. For example in the `DHCPLSS` plugin, I needed to map the value of the `Object_PrimaryID` column returned by the plugin, to the `DHCP_MAC` column in the PiAlert database `DHCP_Leases` table. Notice the `"mapped_to_column": "DHCP_MAC"` key-value pair in the sample below.
|
||||
>🔍 Example:
|
||||
>
|
||||
>For example, this approach is used to implement the `DHCPLSS` plugin. The script parses all supplied "dhcp.leases" files, gets the results in the generic table format outlined in the "Column order and values" section above and takes individual values and inserts them into the `CurrentScan` database table in the PiAlert database. All this is achieved by:
|
||||
>
|
||||
>1. Specifying the database table into which the results are inserted by defining `"mapped_to_table": "CurrentScan"` in the root of the `config.json` file as shown below:
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "code_name": "dhcp_leases",
|
||||
> "unique_prefix": "DHCPLSS",
|
||||
> ...
|
||||
> "data_source": "script",
|
||||
> "localized": ["display_name", "description", "icon"],
|
||||
> "mapped_to_table": "CurrentScan",
|
||||
> ...
|
||||
>}
|
||||
>```
|
||||
>2. Defining the target column with the `mapped_to_column` property for individual columns in the `database_column_definitions` array of the `config.json` file. For example in the `DHCPLSS` plugin, I needed to map the value of the `Object_PrimaryID` column returned by the plugin, to the `cur_MAC` column in the PiAlert database `CurrentScan` table. Notice the `"mapped_to_column": "cur_MAC"` key-value pair in the sample below.
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "column": "Object_PrimaryID",
|
||||
> "mapped_to_column": "cur_MAC",
|
||||
> "css_classes": "col-sm-2",
|
||||
> "show": true,
|
||||
> "type": "device_mac",
|
||||
> "default_value":"",
|
||||
> "options": [],
|
||||
> "localized": ["name"],
|
||||
> "name":[{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "MAC address"
|
||||
> }]
|
||||
> }
|
||||
>```
|
||||
>
|
||||
>3. That's it. PiAlert takes care of the rest. It loops thru the objects discovered by the plugin, takes the results line, by line and inserts them into the database table specified in `"mapped_to_table"`. The columns are translated from the generic plugin columns to the target table via the `"mapped_to_column"` property in the column definitions.
|
||||
|
||||
```json
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "DHCP_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "devicemac",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "MAC address"
|
||||
}]
|
||||
}
|
||||
```
|
||||
> [!NOTE]
|
||||
> You can create a column mapping with a default value via the `mapped_to_column_data` property. This means that the value of the given column will always be this value. Taht also menas that the `"column": "NameDoesntMatter"` is not important as there is no databse source column.
|
||||
|
||||
3) That's it. PiAlert takes care of the rest. It loops thru the objects discovered by the plugin, takes the results line, by line and inserts them into the database table specified in `"mapped_to_table"`. The columns are translated from the generic plugin columns to the target table via the `"mapped_to_column"` property in the column definitions.
|
||||
|
||||
>🔍 Example:
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "column": "NameDoesntMatter",
|
||||
> "mapped_to_column": "cur_ScanMethod",
|
||||
> "mapped_to_column_data": {
|
||||
> "value": "DHCPLSS"
|
||||
> },
|
||||
> "css_classes": "col-sm-2",
|
||||
> "show": true,
|
||||
> "type": "device_mac",
|
||||
> "default_value":"",
|
||||
> "options": [],
|
||||
> "localized": ["name"],
|
||||
> "name":[{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "MAC address"
|
||||
> }]
|
||||
> }
|
||||
>```
|
||||
|
||||
#### params
|
||||
|
||||
@@ -334,18 +457,18 @@ The `params` array in the `config.json` is used to enable the user to change the
|
||||
}
|
||||
```
|
||||
|
||||
During script execution, the app will take the command `"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}"`, take the `{urls}` wildcard and replace it by with the value from the `WEBMON_urls_to_check` setting. This is because:
|
||||
During script execution, the app will take the command `"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}"`, take the `{urls}` wildcard and replace it with the value from the `WEBMON_urls_to_check` setting. This is because:
|
||||
|
||||
1) The app checks the `params` entries
|
||||
2) It finds `"name" : "urls"`
|
||||
3) Checks the type of the `urls` params and finds `"type" : "setting"`
|
||||
4) Gets the setting name from `"value" : "WEBMON_urls_to_check"`
|
||||
1. The app checks the `params` entries
|
||||
2. It finds `"name" : "urls"`
|
||||
3. Checks the type of the `urls` params and finds `"type" : "setting"`
|
||||
4. Gets the setting name from `"value" : "WEBMON_urls_to_check"`
|
||||
- IMPORTANT: in the `config.json` this setting is identified by `"function":"urls_to_check"`, not `"function":"WEBMON_urls_to_check"`
|
||||
- You can also use a global setting, or a setting from a different plugin
|
||||
5) The app gets the user defined value from the setting with the code name `WEBMON_urls_to_check`
|
||||
5. The app gets the user defined value from the setting with the code name `WEBMON_urls_to_check`
|
||||
- let's say the setting with the code name `WEBMON_urls_to_check` contains 2 values entered by the user:
|
||||
- `WEBMON_urls_to_check=['https://google.com','https://duck.com']`
|
||||
6) The app takes the value from `WEBMON_urls_to_check` and replaces the `{urls}` wildcard in the setting where `"function":"CMD"`, so you go from:
|
||||
6. The app takes the value from `WEBMON_urls_to_check` and replaces the `{urls}` wildcard in the setting where `"function":"CMD"`, so you go from:
|
||||
- `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}`
|
||||
- to
|
||||
- `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com`
|
||||
@@ -355,8 +478,10 @@ Below are some general additional notes, when defining `params`:
|
||||
- `"name":"name_value"` - is used as a wildcard replacement in the `CMD` setting value by using curly brackets `{name_value}`. The wildcard is replaced by the result of the `"value" : "param_value"` and `"type":"type_value"` combo configuration below.
|
||||
- `"type":"<sql|setting>"` - is used to specify the type of the params, currently only 2 supported (`sql`,`setting`).
|
||||
- `"type":"sql"` - will execute the SQL query specified in the `value` property. The sql query needs to return only one column. The column is flattened and separated by commas (`,`), e.g: `SELECT dev_MAC from DEVICES` -> `Internet,74:ac:74:ac:74:ac,44:44:74:ac:74:ac`. This is then used to replace the wildcards in the `CMD` setting.
|
||||
- `"type":"setting"` - The setting code name. A combination of the value from `unique_prefix` + `_` + `function` value, or otherwise the code name you can find in the Settings page under the Setting display name, e.g. `SCAN_CYCLE_MINUTES`.
|
||||
- `"value" : "param_value"` - Needs to contain a setting code name or SQL query without wildcards.
|
||||
- `"type":"setting"` - The setting code name. A combination of the value from `unique_prefix` + `_` + `function` value, or otherwise the code name you can find in the Settings page under the Setting display name, e.g. `PIHOLE_RUN`.
|
||||
- `"value": "param_value"` - Needs to contain a setting code name or SQL query without wildcards.
|
||||
- `"timeoutMultiplier" : true` - used to indicate if the value should multiply the max timeout for the whole script run by the number of values in the given parameter.
|
||||
- `"base64": true` - use base64 encoding to pass the value to the script (e.g. if there are spaces)
|
||||
|
||||
|
||||
> 🔎Example:
|
||||
@@ -364,46 +489,87 @@ Below are some general additional notes, when defining `params`:
|
||||
> ```json
|
||||
> {
|
||||
> "params" : [{
|
||||
> "name" : "macs",
|
||||
> "type" : "sql",
|
||||
> "value" : "SELECT dev_MAC from DEVICES"
|
||||
> },
|
||||
> {
|
||||
> "name" : "urls",
|
||||
> "type" : "setting",
|
||||
> "value" : "WEBMON_urls_to_check"
|
||||
> },
|
||||
> {
|
||||
> "name" : "internet_ip",
|
||||
> "type" : "setting",
|
||||
> "value" : "WEBMON_SQL_internet_ip"
|
||||
> }]
|
||||
> "name" : "ips",
|
||||
> "type" : "sql",
|
||||
> "value" : "SELECT dev_LastIP from DEVICES",
|
||||
> "timeoutMultiplier" : true
|
||||
> },
|
||||
> {
|
||||
> "name" : "macs",
|
||||
> "type" : "sql",
|
||||
> "value" : "SELECT dev_MAC from DEVICES"
|
||||
> },
|
||||
> {
|
||||
> "name" : "timeout",
|
||||
> "type" : "setting",
|
||||
> "value" : "NMAP_RUN_TIMEOUT"
|
||||
> },
|
||||
> {
|
||||
> "name" : "args",
|
||||
> "type" : "setting",
|
||||
> "value" : "NMAP_ARGS",
|
||||
> "base64" : true
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
|
||||
#### Setting object structure
|
||||
#### ⚙ Setting object structure
|
||||
|
||||
> [!NOTE]
|
||||
> The settings flow and when Plugin specific settings are applied is described under the [Settings system](/docs/SETTINGS_SYSTEM.md).
|
||||
|
||||
Required attributes are:
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| `"function"` | Specifies the function the setting drives or a simple unique code name. See Supported settings function values for options. |
|
||||
| `"type"` | Specifies the form control used for the setting displayed in the Settings page and what values are accepted. Supported options include: |
|
||||
| | - `text` |
|
||||
| | - `integer` |
|
||||
| | - `boolean` |
|
||||
| | - `password` |
|
||||
| | - `readonly` |
|
||||
| | - `integer.select` |
|
||||
| | - `text.select` |
|
||||
| | - `text.multiselect` |
|
||||
| | - `list` |
|
||||
| | - `integer.checkbox` |
|
||||
| | - `text.template` |
|
||||
| `"localized"` | A list of properties on the current JSON level that need to be localized. |
|
||||
| `"name"` | Displayed on the Settings page. An array of localized strings. See Localized strings below. |
|
||||
| `"description"` | Displayed on the Settings page. An array of localized strings. See Localized strings below. |
|
||||
| (optional) `"events"` | Specifies whether to generate an execution button next to the input field of the setting. Supported values: |
|
||||
| | - `test` |
|
||||
| | - `run` |
|
||||
| (optional) `"override_value"` | Used to determine a user-defined override for the setting. Useful for template-based plugins, where you can choose to leave the current value or override it with the value defined in the setting. (Work in progress) |
|
||||
| (optional) `"events"` | Used to trigger the plugin. Usually used on the `RUN` setting. Not fully tested in all scenarios. Will show a play button next to the setting. After clicking, an event is generated for the backend in the `Parameters` database table to process the front-end event on the next run. |
|
||||
|
||||
- `"function": "<see Supported settings function values>"` - What function the setting drives or a simple unique code name
|
||||
- `"type": "<text|integer|boolean|password|readonly|integer.select|text.select|text.multiselect|list|integer.checkbox>"` - The form control used for the setting displayed in the Settings page and what values are accepted.
|
||||
- `"localized"` - a list of properties on the current JSON level which need to be localized
|
||||
- `"name"` and `"description"` - Displayed in the Settings page. An array of localized strings. (see Localized strings below).
|
||||
|
||||
##### Supported settings `function` values
|
||||
|
||||
You can have any `"function": "my_custom_name"` custom name, however, the ones listed below have a specific functionality attached to them. If you use a custom name, then the setting is mostly used as an input parameter for the `params` section.
|
||||
|
||||
- `RUN` - (required) Specifies when the service is executed
|
||||
- Supported Options: "disabled", "once", "schedule" (if included then a `RUN_SCHD` setting needs to be specified), "always_after_scan", "on_new_device"
|
||||
- `RUN_SCHD` - (required if you include the above `RUN` function) Cron-like scheduling used if the `RUN` setting set to `schedule`
|
||||
- `CMD` - (required) What command should be executed.
|
||||
- `API_SQL` - (optional) Generates a `table_` + code_name + `.json` file as per [API docs](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md).
|
||||
- `RUN_TIMEOUT` - (optional) Max execution time of the script. If not specified a default value of 10 seconds is used to prevent hanging.
|
||||
- `WATCH` - (optional) Which database columns are watched for changes for this particular plugin. If not specified no notifications are sent.
|
||||
- `REPORT_ON` - (optional) Send a notification only on these statuses. Supported options are:
|
||||
- `new` means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered.
|
||||
- `watched-changed` - means that selected `Watched_ValueN` columns changed
|
||||
- `watched-not-changed` - reports even on events where selected `Watched_ValueN` did not change
|
||||
| Setting | Description |
|
||||
| ------- | ----------- |
|
||||
| `RUN` | (required) Specifies when the service is executed. |
|
||||
| | Supported Options: |
|
||||
| | - "disabled" - not run |
|
||||
| | - "once" - run on app start or on settings saved |
|
||||
| | - "schedule" - if included, then a `RUN_SCHD` setting needs to be specified to determine the schedule |
|
||||
| | - "always_after_scan" - run always after a scan is finished |
|
||||
| | - "on_new_device" - run when a new device is detected |
|
||||
| | - "before_config_save" - run before the config is marked as saved. Useful if your plugin needs to modify the `pialert.conf` file. |
|
||||
| `RUN_SCHD` | (required if you include the above `RUN` function) Cron-like scheduling is used if the `RUN` setting is set to `schedule`. |
|
||||
| `CMD` | (required) Specifies the command that should be executed. |
|
||||
| `API_SQL` | (optional) Generates a `table_` + `code_name` + `.json` file as per [API docs](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md). |
|
||||
| `RUN_TIMEOUT` | (optional) Specifies the maximum execution time of the script. If not specified, a default value of 10 seconds is used to prevent hanging. |
|
||||
| `WATCH` | (optional) Specifies which database columns are watched for changes for this particular plugin. If not specified, no notifications are sent. |
|
||||
| `REPORT_ON` | (optional) Specifies when to send a notification. Supported options are: |
|
||||
| | - `new` means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. |
|
||||
| | - `watched-changed` - means that selected `Watched_ValueN` columns changed |
|
||||
| | - `watched-not-changed` - reports even on events where selected `Watched_ValueN` did not change |
|
||||
| | - `missing-in-last-scan` - if the object is missing compared to previous scans |
|
||||
|
||||
|
||||
> 🔎 Example:
|
||||
@@ -444,19 +610,32 @@ You can have any `"function": "my_custom_name"` custom name, however, the ones l
|
||||
|
||||
##### UI settings in database_column_definitions
|
||||
|
||||
The UI will adjust how columns are displayed in the UI based on the definition of the `database_column_definitions` object. These are the supported form controls and related functionality:
|
||||
The UI will adjust how columns are displayed in the UI based on the resolvers definition of the `database_column_definitions` object. These are the supported form controls and related functionality:
|
||||
|
||||
- Only columns with `"show": true` and also with at least an English translation will be shown in the UI.
|
||||
- Supported types: `label`, `text`, `threshold`, `replace`, `deviceip`, `devicemac`, `url`. Check for details below, how columns behave based on the type.
|
||||
- `label` makes a column display only
|
||||
- `text` makes a column editable and a save icon is displayed next to it.
|
||||
- See below for information on `threshold`, `replace`
|
||||
- The `options` property is used in conjunction with these types:
|
||||
- `threshold` - The `options` array contains objects from lowest `maximum` to highest with corresponding `hexColor` used for the value background color if it's less than the specified `maximum`, but more than the previous one in the `options` array
|
||||
- `replace` - The `options` array contains objects with an `equals` property, that is compared to the "value" and if the values are the same, the string in `replacement` is displayed in the UI instead of the actual "value"
|
||||
- `devicemac` - The value is considered to be a Mac address and a link pointing to the device with the given Mac address is generated.
|
||||
- `deviceip` - The value is considered to be an IP address and a link pointing to the device with the given IP is generated. The IP is checked against the last detected IP addresses and translated into a Mac address that is then used for the link itself.
|
||||
- `url` - The value is considered to be a URL so a link is generated.
|
||||
|
||||
| Supported Types | Description |
|
||||
| -------------- | ----------- |
|
||||
| `label` | Displays a column only. |
|
||||
| `text` | Makes a column editable, and a save icon is displayed next to it. See below for information on `threshold`, `replace`. |
|
||||
| | |
|
||||
| `options` Property | Used in conjunction with types like `threshold`, `replace`, `regex`. |
|
||||
| `threshold` | The `options` array contains objects ordered from the lowest `maximum` to the highest. The corresponding `hexColor` is used for the value background color if it's less than the specified `maximum` but more than the previous one in the `options` array. |
|
||||
| `replace` | The `options` array contains objects with an `equals` property, which is compared to the "value." If the values are the same, the string in `replacement` is displayed in the UI instead of the actual "value". |
|
||||
| `regex` | Applies a regex to the value. The `options` array contains objects with an `type` (must be set to `regex`) and `param` (must contain the regex itself) property. |
|
||||
| | |
|
||||
| Type Definitions | |
|
||||
| `device_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given MAC address is generated. |
|
||||
| `device_ip` | The value is considered to be an IP address. A link pointing to the device with the given IP is generated. The IP is checked against the last detected IP address and translated into a MAC address, which is then used for the link itself. |
|
||||
| `device_name_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given IP is generated. The link label is resolved as the target device name. |
|
||||
| `url` | The value is considered to be a URL, so a link is generated. |
|
||||
| `textbox_save` | Generates an editable and saveable text box that saves values in the database. Primarily intended for the `UserData` database column in the `Plugins_Objects` table. |
|
||||
| `url_http_https` | Generates two links with the `https` and `http` prefix as lock icons. |
|
||||
|
||||
|
||||
> [!NOTE]
|
||||
> Supports chaining. You can chain multiple resolvers with `.`. For example `regex.url_http_https`. This will apply the `regex` resolver and then the `url_http_https` resolver.
|
||||
|
||||
|
||||
|
||||
```json
|
||||
@@ -518,12 +697,33 @@ The UI will adjust how columns are displayed in the UI based on the definition o
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value3",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "regex.url_http_https",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"type": "regex",
|
||||
"param": "([\\d.:]+)"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "HTTP/s links"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins.png "Screen 1"
|
||||
[screen2]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_settings.png "Screen 2"
|
||||
[screen3]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_settings.png "Screen 3"
|
||||
[screen4]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_ui.png "Screen 4"
|
||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins.png "Screen 1"
|
||||
[screen2]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_settings.png "Screen 2"
|
||||
[screen3]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_settings.png "Screen 3"
|
||||
[screen4]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_ui.png "Screen 4"
|
||||
[screen5]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_device_details.png "Screen 5"
|
||||
|
||||
722
front/plugins/README_DE.md
Executable file
722
front/plugins/README_DE.md
Executable file
@@ -0,0 +1,722 @@
|
||||
## 📚 Dokumente für einzelne Plugins
|
||||
|
||||
### 🏴 Community-Übersetzungen dieser Datei
|
||||
|
||||
* <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/us.svg" alt="README.md" style="height: 20px !important;width: 20px !important;"> English (American)
|
||||
</a>
|
||||
|
||||
* <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README_ES.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/es.svg" alt="README_ES.md" style="height: 20px !important;width: 20px !important;"> Spanish (Spain)
|
||||
</a>
|
||||
|
||||
### 🔌 Plugins und 📚 Dokumente
|
||||
|
||||
| Required | CurrentScan | Unique Prefix | Plugin Type | Link + Docs |
|
||||
|-------------|-------------|-----------------------|------------------------|----------------------------------------------------------|
|
||||
| | Yes | ARPSCAN | Script | [arp_scan](/front/plugins/arp_scan/) |
|
||||
| | | CSVBCKP | Script | [csv_backup](/front/plugins/csv_backup/) |
|
||||
| | Yes | DHCPLSS | Script | [dhcp_leases](/front/plugins/dhcp_leases/) |
|
||||
| | | DHCPSRVS | Script | [dhcp_servers](/front/plugins/dhcp_servers/) |
|
||||
| Yes | | NEWDEV | Template | [newdev_template](/front/plugins/newdev_template/) |
|
||||
| | | NMAP | Script | [nmap_scan](/front/plugins/nmap_scan/) |
|
||||
| | Yes | PIHOLE | External SQLite DB | [pihole_scan](/front/plugins/pihole_scan/) |
|
||||
| | | SETPWD | Script | [set_password](/front/plugins/set_password/) |
|
||||
| | | SNMPDSC | Script | [snmp_discovery](/front/plugins/snmp_discovery/) |
|
||||
| | Yes* | UNDIS | Script | [undiscoverables](/front/plugins/undiscoverables/) |
|
||||
| | Yes | UNFIMP | Script | [unifi_import](/front/plugins/unifi_import/) |
|
||||
| | | WEBMON | Script | [website_monitor](/front/plugins/website_monitor/) |
|
||||
| N/A | | N/A | SQL query | No beispiel available, but the External SQLite based plugins work very similar |
|
||||
|
||||
>* Das Undiscoverables-Plugin (`UNDIS`) fügt nur vom Benutzer angegebene Dummy-Geräte ein.
|
||||
|
||||
> [!NOTE]
|
||||
> Sie können Plugins über die Einstellungen sanft deaktivieren oder Plugins vollständig ignorieren, indem Sie eine „ignore_plugin“-Datei im Plugin-Verzeichnis ablegen. Der Unterschied besteht darin, dass ignorierte Plugins nirgendwo in der Benutzeroberfläche angezeigt werden (Einstellungen, Gerätedetails, Plugins-Seiten). Die App überspringt ignorierte Plugins vollständig. Geräteerkennungs-Plugins fügen Werte in die Datenbanktabelle „CurrentScan“ ein. Die Plugins, die nicht erforderlich sind, können getrost ignoriert werden, es ist jedoch sinnvoll, zumindest einige Plugins zur Geräteerkennung (die Einträge in die Tabelle „CurrentScan“ einfügen) zu aktivieren, wie z. B. ARPSCAN oder PIHOLE.
|
||||
|
||||
> Es wird empfohlen, für alle Plugins, die für die Erkennung neuer Geräte zuständig sind, das gleiche Zeitplanintervall zu verwenden.
|
||||
|
||||
## 🌟 Erstellen Sie ein benutzerdefiniertes Plugin: Übersicht
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 3][screen3] |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| ![Screen 4][screen4] | ![Screen 5][screen5] |
|
||||
|
||||
PiAlert verfügt über ein Plugin-System, um Ereignisse aus Skripten von Drittanbietern in die Benutzeroberfläche einzuspeisen und dann bei Bedarf Benachrichtigungen zu senden. Die hervorgehobene Kernfunktionalität, die dieses Plugin-System unterstützt, ist:
|
||||
|
||||
* dynamische Erstellung einer einfachen Benutzeroberfläche zur Interaktion mit den entdeckten Objekten,
|
||||
* Filterung der angezeigten Werte in der Geräte-Benutzeroberfläche
|
||||
* Oberflächeneinstellungen von Plugins in der Benutzeroberfläche,
|
||||
* verschiedene Spaltentypen für gemeldete Werte, z.B. Link zurück zu einem Gerät
|
||||
* Objekte in vorhandene PiAlert-Datenbanktabellen importieren
|
||||
|
||||
> (Derzeit wird das Aktualisieren/Überschreiben vorhandener Objekte nicht unterstützt.)
|
||||
|
||||
Beispielanwendungsfälle für Plugins könnten sein:
|
||||
|
||||
* Überwachen Sie einen Webdienst und benachrichtigen Sie mich, wenn er nicht verfügbar ist
|
||||
* Importieren Sie Geräte aus dhcp.leases-Dateien anstelle/ergänzend zur Verwendung von PiHole oder arp-scans
|
||||
* Erstellen von Ad-hoc-UI-Tabellen aus vorhandenen Daten in der PiAlert-Datenbank, z.B. um alle offenen Ports auf Geräten anzuzeigen, um Geräte aufzulisten, die in der letzten Stunde getrennt wurden usw.
|
||||
* Verwendung anderer Geräteerkennungsmethoden im Netzwerk und Importieren der Daten als neue Geräte
|
||||
* Erstellen eines Skripts zum Erstellen gefälschter Geräte basierend auf Benutzereingaben über benutzerdefinierte Einstellungen
|
||||
* ...an diesem Punkt liegt die Einschränkung hauptsächlich in der Kreativität und nicht in der Leistungsfähigkeit (es kann Randfälle geben und die Notwendigkeit, mehr Formularsteuerelemente für Benutzereingaben aus benutzerdefinierten Einstellungen zu unterstützen, aber Sie haben wahrscheinlich schon verstanden, worauf es ankommt)
|
||||
|
||||
Wenn Sie ein Plugin entwickeln möchten, prüfen Sie bitte die bestehende Plugin-Struktur. Sobald die Einstellungen vom Benutzer gespeichert wurden, müssen sie manuell aus der Datei `pialert.conf` entfernt werden, wenn Sie sie aus der `config.json` des Plugins neu initialisieren möchten.
|
||||
|
||||
Bitte lesen Sie das Folgende noch einmal sorgfältig durch, wenn Sie selbst mit einem Plugin beitragen möchten. Diese Dokumentationsdatei ist möglicherweise veraltet. Überprüfen Sie daher auch die Beispiel-Plugins noch einmal.
|
||||
|
||||
## ⚠ Haftungsausschluss
|
||||
|
||||
Befolgen Sie die nachstehenden Anweisungen sorgfältig und prüfen Sie Beispiel-Plugins, wenn Sie selbst eines schreiben möchten. Die Plugin-Benutzeroberfläche ist derzeit nicht meine Priorität. Gerne genehmige ich PRs, wenn Sie daran interessiert sind, die Benutzeroberfläche zu erweitern/verbessern (siehe [Frontend-Richtlinien](/docs/FRONTEND_DEVELOPMENT.md)). Beispielhafte Verbesserungen zum Mitnehmen:
|
||||
|
||||
* Die Tabellen sortierbar/filterbar machen
|
||||
* Verwenden des gleichen Ansatzes zum Anzeigen von Tabellendaten wie im Abschnitt "Geräte" (wird oben gelöst)
|
||||
* Hinzufügen unterstützter Formularsteuerelemente zum Anzeigen der Daten (Derzeit unterstützte Steuerelemente sind im Abschnitt "UI-Einstellungen in Datenbankspaltendefinitionen" unten aufgeführt)
|
||||
* ...
|
||||
|
||||
## ❗ Bekannte Probleme:
|
||||
|
||||
These issues will be hopefully fixed with time, so please don't report them. Instead, if you know how, feel free to investigate and submit a PR to fix the below. Keep the PRs small as it's easier to approve them:
|
||||
|
||||
* Vorhandene Plugin-Objekte werden manchmal nicht richtig interpretiert und stattdessen wird ein neues Objekt erstellt, was zu doppelten Einträgen führt. (Rennbedingung?)
|
||||
* Gelegentliches (zweimal aufgetretenes) Hängenbleiben der Verarbeitungs-Plugin-Skriptdatei.
|
||||
Die Benutzeroberfläche zeigt veraltete Werte an, bis die API-Endpunkte aktualisiert werden.
|
||||
|
||||
## Übersicht über die Plugin-Dateistruktur
|
||||
|
||||
> ⚠️Der Ordnername muss mit dem Codenamenwert in Folgendem übereinstimmen: `"code_name": "<value>"`
|
||||
> Das eindeutige Präfix muss im Vergleich zu den anderen Einstellungspräfixen eindeutig sein, z. B.: Das Präfix `APPRISE` wird bereits verwendet.
|
||||
|
||||
| File | Required (plugin type) | Description |
|
||||
|----------------------|----------------------|----------------------|
|
||||
| `config.json` | yes | Contains the plugin configuration (manifest) including the settings available to the user. |
|
||||
| `script.py` | no | The Python script itself. You may call any valid linux command. |
|
||||
| `last_result.log` | no | The file used to interface between PiAlert and the plugin. Required for a script plugin if you want to feed data into the app. |
|
||||
| `script.log` | no | Logging output (recommended) |
|
||||
| `README.md` | yes | Any setup considerations or overview |
|
||||
|
||||
Weitere Einzelheiten finden Sie weiter unten.
|
||||
|
||||
### Spaltenreihenfolge und Werte
|
||||
|
||||
| Order | Represented Column | Required | Description |
|
||||
|----------------------|----------------------|----------------------|----------------------|
|
||||
| 0 | `Object_PrimaryID` | yes | The primary ID used to group Events under. |
|
||||
| 1 | `Object_SecondaryID` | no | Optional secondary ID to create a relationship beween other entities, such as a MAC address |
|
||||
| 2 | `DateTime` | yes | When the event occured in the format `2023-01-02 15:56:30` |
|
||||
| 3 | `Watched_Value1` | yes | A value that is watched and users can receive notifications if it changed compared to the previously saved entry. For beispiel IP address |
|
||||
| 4 | `Watched_Value2` | no | As above |
|
||||
| 5 | `Watched_Value3` | no | As above |
|
||||
| 6 | `Watched_Value4` | no | As above |
|
||||
| 7 | `Extra` | no | Any other data you want to pass and display in PiAlert and the notifications |
|
||||
| 8 | `ForeignKey` | no | A foreign key that can be used to link to the parent object (usually a MAC address) |
|
||||
|
||||
> [!NOTE]
|
||||
> De-duplication is run once an hour on the `Plugins_Objects` database table and duplicate entries with the same value in columns `Object_PrimaryID`, `Object_SecondaryID`, `Plugin` (auto-filled based on `unique_prefix` of the plugin), `UserData` (can be populated with the `"type": "textbox_save"` column type) are removed.
|
||||
|
||||
# config.json structure
|
||||
|
||||
## Unterstützte Datenquellen
|
||||
|
||||
Currently, these data sources are supported (valid `data_source` value).
|
||||
|
||||
| Name | `data_source` value | Needs to return a "table" | Overview (more details on this page below) |
|
||||
|----------------------|----------------------|----------------------|----------------------|
|
||||
| Script | `script` | no | Executes any linux command in the `CMD` setting. |
|
||||
| Pialert DB query | `pialert-db-query` | yes | Executes a SQL query on the PiAlert database in the `CMD` setting. |
|
||||
| Template | `template` | no | Used to generate internal settings, such as default values. |
|
||||
| External SQLite DB query | `sqlite-db-query` | yes | Executes a SQL query from the `CMD` setting on an external SQLite database mapped in the `DB_PATH` setting. |
|
||||
|
||||
|
||||
> 🔎Beispiel
|
||||
>```json
|
||||
>"data_source": "pialert-db-query"
|
||||
>```
|
||||
If you want to display plugin objects or import devices into the app, data sources have to return a "table" of the exact structure as outlined above.
|
||||
|
||||
You can show or hide the UI on the "Plugins" page and "Plugins" tab for a plugin on devices via the `show_ui` property:
|
||||
|
||||
> 🔎Beispiel
|
||||
>```json
|
||||
> "show_ui": true,
|
||||
> ```
|
||||
|
||||
### "data_source": "script"
|
||||
|
||||
If the `data_source` is set to `script` the `CMD` setting (that you specify in the `settings` array section in the `config.json`) contains an executable Linux command, that usually generates a `last_result.log` file (not required if you don't import any data into the app). This file needs to be stored in the same folder as the plugin.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> A lot of the work is taken care of by the [`plugin_helper.py` library](/front/plugins/plugin_helper.py). You don't need to manage the `last_result.log` file if using the helper objects. Check other `script.py` of other plugins for details (The [Undicoverables plugins `script.py` file](/front/plugins/undiscoverables/script.py) is a good beispiel).
|
||||
|
||||
The content of the `last_result.log` file needs to contain the columns as defined in the "Column order and values" section above. The order of columns can't be changed. After every scan it should contain only the results from the latest scan/execution.
|
||||
|
||||
- The format of the `last_result.log` is a `csv`-like file with the pipe `|` as a separator.
|
||||
- 9 (nine) values need to be supplied, so every line needs to contain 8 pipe separators. Empty values are represented by `null`.
|
||||
- Don't render "headers" for these "columns".
|
||||
Every scan result/event entry needs to be on a new line.
|
||||
- You can find which "columns" need to be present, and if the value is required or optional, in the "Column order and values" section.
|
||||
- The order of these "columns" can't be changed.
|
||||
|
||||
#### 🔎 last_result.log beispieles
|
||||
|
||||
Valid CSV:
|
||||
|
||||
```csv
|
||||
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898|null|null|null|null
|
||||
https://www.duckduckgo.com|192.168.0.1|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|ff:ee:ff:11:ff:11
|
||||
|
||||
```
|
||||
|
||||
Invalid CSV with different errors on each line:
|
||||
|
||||
```csv
|
||||
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898||null|null|null
|
||||
https://www.duckduckgo.com|null|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|
|
||||
|https://www.duckduckgo.com|null|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|null
|
||||
null|192.168.1.1|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine
|
||||
https://www.duckduckgo.com|192.168.1.1|2023-01-02 15:56:30|null|0.9898|null|null|Best search engine
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898|||
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898|
|
||||
|
||||
```
|
||||
|
||||
### "data_source": "pialert-db-query"
|
||||
|
||||
If the `data_source` is set to `pialert-db-query` the `CMD` setting needs to contain a SQL query rendering the columns as defined in the "Column order and values" section above. The order of columns is important.
|
||||
|
||||
This SQL query is executed on the `pialert.db` SQLite database file.
|
||||
|
||||
> 🔎Beispiel
|
||||
>
|
||||
> SQL query Beispiel:
|
||||
>
|
||||
> ```SQL
|
||||
> SELECT dv.dev_Name as Object_PrimaryID,
|
||||
> cast(dv.dev_LastIP as VARCHAR(100)) || ':' || cast( SUBSTR(ns.Port ,0, INSTR(ns.Port , '/')) as VARCHAR(100)) as Object_SecondaryID,
|
||||
> datetime() as DateTime,
|
||||
> ns.Service as Watched_Value1,
|
||||
> ns.State as Watched_Value2,
|
||||
> 'null' as Watched_Value3,
|
||||
> 'null' as Watched_Value4,
|
||||
> ns.Extra as Extra,
|
||||
> dv.dev_MAC as ForeignKey
|
||||
> FROM
|
||||
> (SELECT * FROM Nmap_Scan) ns
|
||||
> LEFT JOIN
|
||||
> (SELECT dev_Name, dev_MAC, dev_LastIP FROM Devices) dv
|
||||
> ON ns.MAC = dv.dev_MAC
|
||||
> ```
|
||||
>
|
||||
> Required `CMD` setting beispiel with above query (you can set `"type": "label"` if you want it to make uneditable in the UI):
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "function": "CMD",
|
||||
> "type": "text",
|
||||
> "default_value":"SELECT dv.dev_Name as Object_PrimaryID, cast(dv.dev_LastIP as VARCHAR(100)) || ':' || cast( SUBSTR(ns.Port ,0, INSTR(ns.Port , '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, ns.Service as Watched_Value1, ns.State as Watched_Value2, 'null' as Watched_Value3, 'null' as Watched_Value4, ns.Extra as Extra FROM (SELECT * FROM Nmap_Scan) ns LEFT JOIN (SELECT dev_Name, dev_MAC, dev_LastIP FROM Devices) dv ON ns.MAC = dv.dev_MAC",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "SQL to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "This SQL query is used to populate the coresponding UI tables under the Plugins section."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
### "data_source": "template"
|
||||
|
||||
Used to initialize internal settings. Check the `newdev_template` plugin for details.
|
||||
|
||||
### "data_source": "sqlite-db-query"
|
||||
|
||||
You can execute a SQL query on an external database connected to the current PiALert database via a temporary `EXTERNAL_<unique prefix>.` prefix. For beispiel for `PIHOLE` (`"unique_prefix": "PIHOLE"`) it is `EXTERNAL_PIHOLE.`. The external SQLite database file has to be mapped in the container to the path specified in the `DB_PATH` setting:
|
||||
|
||||
> 🔎Beispiel
|
||||
>
|
||||
>```json
|
||||
> ...
|
||||
>{
|
||||
> "function": "DB_PATH",
|
||||
> "type": "readonly",
|
||||
> "default_value":"/etc/pihole/pihole-FTL.db",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "DB Path"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "Required setting for the <code>sqlite-db-query</code> plugin type. Is used to mount an external SQLite database and execute the SQL query stored in the <code>CMD</code> setting."
|
||||
> }]
|
||||
> }
|
||||
> ...
|
||||
>```
|
||||
|
||||
The actual SQL query you want to execute is then stored as a `CMD` setting, similar to the `pialert-db-query` plugin type The format has to adhere to the format outlined in the "Column order and values" section above.
|
||||
|
||||
> 🔎Beispiel
|
||||
>
|
||||
> Notice the `EXTERNAL_PIHOLE.` prefix.
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "function": "CMD",
|
||||
> "type": "text",
|
||||
> "default_value":"SELECT hwaddr as Object_PrimaryID, cast('http://' || (SELECT ip FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1) as VARCHAR(100)) || ':' || cast( SUBSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1), 0, INSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1), '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, macVendor as Watched_Value1, lastQuery as Watched_Value2, (SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1) as Watched_Value3, 'null' as Watched_Value4, '' as Extra, hwaddr as ForeignKey FROM EXTERNAL_PIHOLE.network WHERE hwaddr NOT LIKE 'ip-%' AND hwaddr <> '00:00:00:00:00:00'; ",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "SQL to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "This SQL query is used to populate the coresponding UI tables under the Plugins section. This particular one selects data from a mapped PiHole SQLite database and maps it to the corresponding Plugin columns."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
## 🕳 Filter
|
||||
|
||||
Plugin-Einträge können in der Benutzeroberfläche basierend auf in Filterfeldern eingegebenen Werten gefiltert werden. Das Textfeld/Feld `txtMacFilter` enthält die Mac-Adresse des aktuell angezeigten Geräts oder einfach eine Mac-Adresse, die in der Abfragezeichenfolge `mac` verfügbar ist.
|
||||
|
||||
| Property | Required | Description |
|
||||
|----------------------|----------------------|----------------------|
|
||||
| `compare_column` | yes | Plugin column name that's value is used for comparison (**Left** side of the equation) |
|
||||
| `compare_operator` | yes | JavaScript comparison operator |
|
||||
| `compare_field_id` | yes | The `id` of a input text field containing a value is used for comparison (**Right** side of the equation)|
|
||||
| `compare_js_template` | yes | JavaScript code used to convert left and right side of the equation. `{value}` is replaced with input values. |
|
||||
| `compare_use_quotes` | yes | If `true` then the end result of the `compare_js_template` i swrapped in `"` quotes. Use to compare strings. |
|
||||
|
||||
Filters are only applied if a filter is specified and the `txtMacFilter` is not `undefined` or empty (`--`).
|
||||
|
||||
> 🔎Beispiel:
|
||||
>
|
||||
> ```json
|
||||
> "data_filters": [
|
||||
> {
|
||||
> "compare_column" : "Object_PrimaryID",
|
||||
> "compare_operator" : "==",
|
||||
> "compare_field_id": "txtMacFilter",
|
||||
> "compare_js_template": "'{value}'.toString()",
|
||||
> "compare_use_quotes": true
|
||||
> }
|
||||
> ],
|
||||
> ```
|
||||
>
|
||||
>1. On the `pluginsCore.php` page is an input field with the `txtMacFilter` id:
|
||||
>
|
||||
>```html
|
||||
><input class="form-control" id="txtMacFilter" type="text" value="--">
|
||||
>```
|
||||
>
|
||||
>2. This input field is initialized via the `&mac=` query string.
|
||||
>
|
||||
>3. The app then proceeds to use this Mac value from this field and compares it to the value of the `Object_PrimaryID` database field. The `compare_operator` is `==`.
|
||||
>
|
||||
>4. Both values, from the database field `Object_PrimaryID` and from the `txtMacFilter` are wrapped and evaluated with the `compare_js_template`, that is `'{value}.toString()'`.
|
||||
>
|
||||
>5. `compare_use_quotes` is set to `true` so `'{value}'.toString()` is wrappe dinto `"` quotes.
|
||||
>
|
||||
>6. Daraus ergibt sich beispielsweise dieser code:
|
||||
>
|
||||
>```javascript
|
||||
> // left part of teh expression coming from compare_column and right from the input field
|
||||
> // notice the added quotes ()") around the left and right part of teh expression
|
||||
> "eval('ac:82:ac:82:ac:82".toString()')" == "eval('ac:82:ac:82:ac:82".toString()')"
|
||||
>```
|
||||
>
|
||||
|
||||
|
||||
### 🗺 Zuordnung der Plugin-Ergebnisse zu einer Datenbanktabelle
|
||||
|
||||
Plugin results are always inserted into the standard `Plugin_Objects` database table. Optionally, PiAlert can take the results of the plugin execution and insert these results into an additional database table. This is enabled by with the property `"mapped_to_table"` in the `config.json` file. The mapping of the columns is defined in the `database_column_definitions` array.
|
||||
|
||||
> [!NOTE]
|
||||
> If results are mapped to the `CurrentScan` table, the data is then included into the regular scan loop, so for beispiel notification for devices are sent out.
|
||||
|
||||
|
||||
>🔍 Beispiel:
|
||||
>
|
||||
>For beispiel, this approach is used to implement the `DHCPLSS` plugin. The script parses all supplied "dhcp.leases" files, gets the results in the generic table format outlined in the "Column order and values" section above and takes individual values and inserts them into the `CurrentScan` database table in the PiAlert database. All this is achieved by:
|
||||
>
|
||||
>1. Specifying the database table into which the results are inserted by defining `"mapped_to_table": "CurrentScan"` in the root of the `config.json` file as shown below:
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "code_name": "dhcp_leases",
|
||||
> "unique_prefix": "DHCPLSS",
|
||||
> ...
|
||||
> "data_source": "script",
|
||||
> "localized": ["display_name", "description", "icon"],
|
||||
> "mapped_to_table": "CurrentScan",
|
||||
> ...
|
||||
>}
|
||||
>```
|
||||
>2. Defining the target column with the `mapped_to_column` property for individual columns in the `database_column_definitions` array of the `config.json` file. For beispiel in the `DHCPLSS` plugin, I needed to map the value of the `Object_PrimaryID` column returned by the plugin, to the `cur_MAC` column in the PiAlert database `CurrentScan` table. Notice the `"mapped_to_column": "cur_MAC"` key-value pair in the sample below.
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "column": "Object_PrimaryID",
|
||||
> "mapped_to_column": "cur_MAC",
|
||||
> "css_classes": "col-sm-2",
|
||||
> "show": true,
|
||||
> "type": "device_mac",
|
||||
> "default_value":"",
|
||||
> "options": [],
|
||||
> "localized": ["name"],
|
||||
> "name":[{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "MAC address"
|
||||
> }]
|
||||
> }
|
||||
>```
|
||||
>
|
||||
>3. That's it. PiAlert takes care of the rest. It loops thru the objects discovered by the plugin, takes the results line, by line and inserts them into the database table specified in `"mapped_to_table"`. The columns are translated from the generic plugin columns to the target table via the `"mapped_to_column"` property in the column definitions.
|
||||
|
||||
> [!NOTE]
|
||||
> You can create a column mapping with a default value via the `mapped_to_column_data` property. This means that the value of the given column will always be this value. Taht also menas that the `"column": "NameDoesntMatter"` is not important as there is no databse source column.
|
||||
|
||||
|
||||
>🔍 Beispiel:
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "column": "NameDoesntMatter",
|
||||
> "mapped_to_column": "cur_ScanMethod",
|
||||
> "mapped_to_column_data": {
|
||||
> "value": "DHCPLSS"
|
||||
> },
|
||||
> "css_classes": "col-sm-2",
|
||||
> "show": true,
|
||||
> "type": "device_mac",
|
||||
> "default_value":"",
|
||||
> "options": [],
|
||||
> "localized": ["name"],
|
||||
> "name":[{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "MAC address"
|
||||
> }]
|
||||
> }
|
||||
>```
|
||||
|
||||
#### params
|
||||
|
||||
The `params` array in the `config.json` is used to enable the user to change the parameters of the executed script. For beispiel, the user wants to monitor a specific URL.
|
||||
|
||||
> 🔎 Beispiel:
|
||||
> Passing user-defined settings to a command. Let's say, you want to have a script, that is called with a user-defined parameter called `urls`:
|
||||
>
|
||||
> ```bash
|
||||
> root@server# python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com
|
||||
> ```
|
||||
|
||||
* You can allow the user to add URLs to a setting with the `function` property set to a custom name, such as `urls_to_check` (this is not a reserved name from the section "Supported settings `function` values" below).
|
||||
* You specify the parameter `urls` in the `params` section of the `config.json` the following way (`WEBMON_` is the plugin prefix automatically added to all the settings):
|
||||
```json
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "urls",
|
||||
"type" : "setting",
|
||||
"value" : "WEBMON_urls_to_check"
|
||||
}]
|
||||
}
|
||||
```
|
||||
* Then you use this setting as an input parameter for your command in the `CMD` setting. Notice `urls={urls}` in the below json:
|
||||
|
||||
```json
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "text",
|
||||
"default_value":"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command to run"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
During script execution, the app will take the command `"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}"`, take the `{urls}` wildcard and replace it with the value from the `WEBMON_urls_to_check` setting. This is because:
|
||||
|
||||
1. The app checks the `params` entries
|
||||
2. It finds `"name" : "urls"`
|
||||
3. Checks the type of the `urls` params and finds `"type" : "setting"`
|
||||
4. Gets the setting name from `"value" : "WEBMON_urls_to_check"`
|
||||
- IMPORTANT: in the `config.json` this setting is identified by `"function":"urls_to_check"`, not `"function":"WEBMON_urls_to_check"`
|
||||
- You can also use a global setting, or a setting from a different plugin
|
||||
5. The app gets the user defined value from the setting with the code name `WEBMON_urls_to_check`
|
||||
- let's say the setting with the code name `WEBMON_urls_to_check` contains 2 values entered by the user:
|
||||
- `WEBMON_urls_to_check=['https://google.com','https://duck.com']`
|
||||
6. The app takes the value from `WEBMON_urls_to_check` and replaces the `{urls}` wildcard in the setting where `"function":"CMD"`, so you go from:
|
||||
- `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}`
|
||||
- to
|
||||
- `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com`
|
||||
|
||||
Below are some general additional notes, when defining `params`:
|
||||
|
||||
- `"name":"name_value"` - is used as a wildcard replacement in the `CMD` setting value by using curly brackets `{name_value}`. The wildcard is replaced by the result of the `"value" : "param_value"` and `"type":"type_value"` combo configuration below.
|
||||
- `"type":"<sql|setting>"` - is used to specify the type of the params, currently only 2 supported (`sql`,`setting`).
|
||||
- `"type":"sql"` - will execute the SQL query specified in the `value` property. The sql query needs to return only one column. The column is flattened and separated by commas (`,`), e.g: `SELECT dev_MAC from DEVICES` -> `Internet,74:ac:74:ac:74:ac,44:44:74:ac:74:ac`. This is then used to replace the wildcards in the `CMD` setting.
|
||||
- `"type":"setting"` - The setting code name. A combination of the value from `unique_prefix` + `_` + `function` value, or otherwise the code name you can find in the Settings page under the Setting display name, e.g. `PIHOLE_RUN`.
|
||||
- `"value": "param_value"` - Needs to contain a setting code name or SQL query without wildcards.
|
||||
- `"timeoutMultiplier" : true` - used to indicate if the value should multiply the max timeout for the whole script run by the number of values in the given parameter.
|
||||
- `"base64": true` - use base64 encoding to pass the value to the script (e.g. if there are spaces)
|
||||
|
||||
|
||||
> 🔎Beispiel:
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "params" : [{
|
||||
> "name" : "ips",
|
||||
> "type" : "sql",
|
||||
> "value" : "SELECT dev_LastIP from DEVICES",
|
||||
> "timeoutMultiplier" : true
|
||||
> },
|
||||
> {
|
||||
> "name" : "macs",
|
||||
> "type" : "sql",
|
||||
> "value" : "SELECT dev_MAC from DEVICES"
|
||||
> },
|
||||
> {
|
||||
> "name" : "timeout",
|
||||
> "type" : "setting",
|
||||
> "value" : "NMAP_RUN_TIMEOUT"
|
||||
> },
|
||||
> {
|
||||
> "name" : "args",
|
||||
> "type" : "setting",
|
||||
> "value" : "NMAP_ARGS",
|
||||
> "base64" : true
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
|
||||
#### ⚙ Objektstruktur festlegen
|
||||
|
||||
> [!NOTE]
|
||||
> Der Einstellungsablauf und wann Plugin-spezifische Einstellungen angewendet werden, wird im [Einstellungssystem](/docs/SETTINGS_SYSTEM.md) beschrieben.
|
||||
|
||||
Required attributes are:
|
||||
|
||||
| Property | Description |
|
||||
| -------- | ----------- |
|
||||
| `"function"` | Specifies the function the setting drives or a simple unique code name. See Supported settings function values for options. |
|
||||
| `"type"` | Specifies the form control used for the setting displayed in the Settings page and what values are accepted. Supported options include: |
|
||||
| | - `text` |
|
||||
| | - `integer` |
|
||||
| | - `boolean` |
|
||||
| | - `password` |
|
||||
| | - `readonly` |
|
||||
| | - `integer.select` |
|
||||
| | - `text.select` |
|
||||
| | - `text.multiselect` |
|
||||
| | - `list` |
|
||||
| | - `integer.checkbox` |
|
||||
| | - `text.template` |
|
||||
| `"localized"` | A list of properties on the current JSON level that need to be localized. |
|
||||
| `"name"` | Displayed on the Settings page. An array of localized strings. See Localized strings below. |
|
||||
| `"description"` | Displayed on the Settings page. An array of localized strings. See Localized strings below. |
|
||||
| (optional) `"events"` | Specifies whether to generate an execution button next to the input field of the setting. Supported values: |
|
||||
| | - `test` |
|
||||
| | - `run` |
|
||||
| (optional) `"override_value"` | Used to determine a user-defined override for the setting. Useful for template-based plugins, where you can choose to leave the current value or override it with the value defined in the setting. (Work in progress) |
|
||||
| (optional) `"events"` | Used to trigger the plugin. Usually used on the `RUN` setting. Not fully tested in all scenarios. Will show a play button next to the setting. After clicking, an event is generated for the backend in the `Parameters` database table to process the front-end event on the next run. |
|
||||
|
||||
|
||||
##### Unterstützte Einstellungen `function` werte
|
||||
|
||||
You can have any `"function": "my_custom_name"` custom name, however, the ones listed below have a specific functionality attached to them. If you use a custom name, then the setting is mostly used as an input parameter for the `params` section.
|
||||
|
||||
| Setting | Description |
|
||||
| ------- | ----------- |
|
||||
| `RUN` | (required) Specifies when the service is executed. |
|
||||
| | Supported Options: |
|
||||
| | - "disabled" - not run |
|
||||
| | - "once" - run on app start or on settings saved |
|
||||
| | - "schedule" - if included, then a `RUN_SCHD` setting needs to be specified to determine the schedule |
|
||||
| | - "always_after_scan" - run always after a scan is finished |
|
||||
| | - "on_new_device" - run when a new device is detected |
|
||||
| | - "before_config_save" - run before the config is marked as saved. Useful if your plugin needs to modify the `pialert.conf` file. |
|
||||
| `RUN_SCHD` | (required if you include the above `RUN` function) Cron-like scheduling is used if the `RUN` setting is set to `schedule`. |
|
||||
| `CMD` | (required) Specifies the command that should be executed. |
|
||||
| `API_SQL` | (optional) Generates a `table_` + `code_name` + `.json` file as per [API docs](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md). |
|
||||
| `RUN_TIMEOUT` | (optional) Specifies the maximum execution time of the script. If not specified, a default value of 10 seconds is used to prevent hanging. |
|
||||
| `WATCH` | (optional) Specifies which database columns are watched for changes for this particular plugin. If not specified, no notifications are sent. |
|
||||
| `REPORT_ON` | (optional) Specifies when to send a notification. Supported options are: |
|
||||
| | - `new` means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. |
|
||||
| | - `watched-changed` - means that selected `Watched_ValueN` columns changed |
|
||||
| | - `watched-not-changed` - reports even on events where selected `Watched_ValueN` did not change |
|
||||
| | - `missing-in-last-scan` - if the object is missing compared to previous scans |
|
||||
|
||||
|
||||
|
||||
> 🔎 Beispiel:
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "function": "RUN",
|
||||
> "type": "text.select",
|
||||
> "default_value":"disabled",
|
||||
> "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" :[{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "When to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "Enable a regular scan of your services. If you select <code>schedule</code> the scheduling settings from below are applied. If you select <code>once</code> the scan is run only once on start of the application (container) for the time specified in <a href=\"#WEBMON_RUN_TIMEOUT\"><code>WEBMON_RUN_TIMEOUT</code> setting</a>."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
##### 🌍Lokalisierte Zeichenfolgen
|
||||
|
||||
- `"language_code":"<en_us|es_es|de_de>"` - code name of the language string. Only these three are currently supported. At least the `"language_code":"en_us"` variant has to be defined.
|
||||
- `"string"` - The string to be displayed in the given language.
|
||||
|
||||
> 🔎 Beispiel:
|
||||
>
|
||||
> ```json
|
||||
>
|
||||
> {
|
||||
> "language_code":"en_us",
|
||||
> "string" : "When to run"
|
||||
> }
|
||||
>
|
||||
> ```
|
||||
|
||||
##### UI-Einstellungen in database_column_definitions.
|
||||
|
||||
The UI will adjust how columns are displayed in the UI based on the resolvers definition of the `database_column_definitions` object. These are the supported form controls and related functionality:
|
||||
|
||||
- Only columns with `"show": true` and also with at least an English translation will be shown in the UI.
|
||||
|
||||
| Supported Types | Description |
|
||||
| -------------- | ----------- |
|
||||
| `label` | Displays a column only. |
|
||||
| `text` | Makes a column editable, and a save icon is displayed next to it. See below for information on `threshold`, `replace`. |
|
||||
| | |
|
||||
| `options` Property | Used in conjunction with types like `threshold`, `replace`, `regex`. |
|
||||
| `threshold` | The `options` array contains objects ordered from the lowest `maximum` to the highest. The corresponding `hexColor` is used for the value background color if it's less than the specified `maximum` but more than the previous one in the `options` array. |
|
||||
| `replace` | The `options` array contains objects with an `equals` property, which is compared to the "value." If the values are the same, the string in `replacement` is displayed in the UI instead of the actual "value". |
|
||||
| `regex` | Applies a regex to the value. The `options` array contains objects with an `type` (must be set to `regex`) and `param` (must contain the regex itself) property. |
|
||||
| | |
|
||||
| Type Definitions | |
|
||||
| `device_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given MAC address is generated. |
|
||||
| `device_ip` | The value is considered to be an IP address. A link pointing to the device with the given IP is generated. The IP is checked against the last detected IP address and translated into a MAC address, which is then used for the link itself. |
|
||||
| `device_name_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given IP is generated. The link label is resolved as the target device name. |
|
||||
| `url` | The value is considered to be a URL, so a link is generated. |
|
||||
| `textbox_save` | Generates an editable and saveable text box that saves values in the database. Primarily intended for the `UserData` database column in the `Plugins_Objects` table. |
|
||||
| `url_http_https` | Generates two links with the `https` and `http` prefix as lock icons. |
|
||||
|
||||
|
||||
> [!NOTE]
|
||||
> Unterstützt Verkettung. Sie können mehrere Resolver mit „.“ verketten. Zum Beispiel `regex.url_http_https`. Dadurch wird der Resolver `regex` und dann der Resolver `url_http_https` angewendet.
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "threshold",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"maximum": 199,
|
||||
"hexColor": "#792D86"
|
||||
},
|
||||
{
|
||||
"maximum": 299,
|
||||
"hexColor": "#5B862D"
|
||||
},
|
||||
{
|
||||
"maximum": 399,
|
||||
"hexColor": "#7D862D"
|
||||
},
|
||||
{
|
||||
"maximum": 499,
|
||||
"hexColor": "#BF6440"
|
||||
},
|
||||
{
|
||||
"maximum": 599,
|
||||
"hexColor": "#D33115"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status code"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<i class='fa-solid fa-square-check'></i>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<i class='fa-solid fa-triangle-exclamation'></i>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<i class='fa-solid fa-circle-plus'></i>"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value3",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "regex.url_http_https",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"type": "regex",
|
||||
"param": "([\\d.:]+)"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "HTTP/s links"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins.png "Screen 1"
|
||||
[screen2]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_settings.png "Screen 2"
|
||||
[screen3]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_settings.png "Screen 3"
|
||||
[screen4]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_ui.png "Screen 4"
|
||||
[screen5]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_device_details.png "Screen 5"
|
||||
631
front/plugins/README_ES.md
Executable file
631
front/plugins/README_ES.md
Executable file
@@ -0,0 +1,631 @@
|
||||
## 📚 Documentos para plugins individuales
|
||||
|
||||
### 🏴 Traducciones comunitarias de este archivo
|
||||
|
||||
* <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/us.svg" alt="README.md" style="height: 20px !important;width: 20px !important;"> Ingles (Americano)
|
||||
</a>
|
||||
|
||||
* <a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README_DE.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/de.svg" alt="README.md" style="height: 20px !important;width: 20px !important;"> Alemán (Alemania)
|
||||
</a>
|
||||
|
||||
### 🔌 Plugins y 📚 Documentos
|
||||
|
||||
| Requerido | CurrentScan | Prefijo único | Tipo de plugin | Enlace + Documentos |
|
||||
|-------------|-------------|-----------------------|------------------------|----------------------------------------------------------|
|
||||
| | Sí | ARPSCAN | Script | [arp_scan](/front/plugins/arp_scan/) |
|
||||
| | | CSVBCKP | Script | [csv_backup](/front/plugins/csv_backup/) |
|
||||
| | Sí | DHCPLSS | Script | [dhcp_leases](/front/plugins/dhcp_leases/) |
|
||||
| | | DHCPSRVS | Script | [dhcp_servers](/front/plugins/dhcp_servers/) |
|
||||
| Sí | | NEWDEV | Template | [newdev_template](/front/plugins/newdev_template/) |
|
||||
| | | NMAP | Script | [nmap_scan](/front/plugins/nmap_scan/) |
|
||||
| | Sí | PIHOLE | External SQLite DB | [pihole_scan](/front/plugins/pihole_scan/) |
|
||||
| | | SETPWD | Script | [set_password](/front/plugins/set_password/) |
|
||||
| | | SNMPDSC | Script | [snmp_discovery](/front/plugins/snmp_discovery/) |
|
||||
| | Sí* | UNDIS | Script | [undiscoverables](/front/plugins/undiscoverables/) |
|
||||
| | Sí | UNFIMP | Script | [unifi_import](/front/plugins/unifi_import/) |
|
||||
| | | WEBMON | Script | [website_monitor](/front/plugins/website_monitor/) |
|
||||
| N/A | | N/A | SQL query | No hay ningún ejemplo disponible, pero los complementos basados en SQLite externo funcionan de manera muy similar |
|
||||
|
||||
>* El complemento Undiscoverables (`UNDIS`) inserta solo dispositivos ficticios especificados por el usuario.
|
||||
|
||||
> [!NOTE]
|
||||
> Puede desactivar los complementos a través de Configuración o ignorarlos por completo colocando un archivo `ignore_plugin` en el directorio de complementos. La diferencia es que los complementos ignorados no aparecen en ninguna parte de la interfaz de usuario (Configuración, Detalles del dispositivo, páginas de complementos). La aplicación omite por completo los complementos ignorados. Los complementos de detección de dispositivos insertan valores en la tabla de base de datos "CurrentScan". Es seguro ignorar los complementos que no son necesarios; sin embargo, tiene sentido tener habilitados al menos algunos complementos de detección de dispositivos (que insertan entradas en la tabla `CurrentScan`), como ARPSCAN o PIHOLE.
|
||||
|
||||
> Se recomienda utilizar el mismo intervalo de programación para todos los complementos responsables de descubrir nuevos dispositivos.
|
||||
|
||||
## 🌟 Crear un plugin personalizado: Descripción general
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 3][screen3] |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| ![Screen 4][screen4] | ![Screen 5][screen5] |
|
||||
|
||||
PiAlert viene con un sistema de complementos para enviar eventos desde scripts de terceros a la interfaz de usuario y luego enviar notificaciones, si lo desea. La funcionalidad principal destacada que admite este sistema de complementos es:
|
||||
|
||||
* creación dinámica de una interfaz de usuario simple para interactuar con los objetos descubiertos,
|
||||
* filtrado de valores mostrados en la interfaz de usuario de dispositivos
|
||||
* configuración superficial de complementos en la interfaz de usuario,
|
||||
* diferentes tipos de columnas para los valores informados, por ejemplo. vincular de nuevo a un dispositivo
|
||||
* importar objetos a tablas de bases de datos PiAlert existentes
|
||||
|
||||
> (Actualmente, no se admite la actualización/sobrescritura de objetos existentes..)
|
||||
|
||||
Ejemplos de casos de uso de plugins podrían ser:
|
||||
|
||||
* Monitorear un servicio web y avisarme si está caído
|
||||
* Importar dispositivos desde archivos dhcp.leases en lugar/complementario al uso de PiHole o arp-scans
|
||||
* Creación de tablas de UI ad-hoc a partir de datos existentes en la base de datos PiAlert, p.e. para mostrar todos los puertos abiertos en los dispositivos, para enumerar los dispositivos que se desconectaron en la última hora, etc.
|
||||
* Usar otros métodos de descubrimiento de dispositivos en la red e importar los datos como dispositivos nuevos
|
||||
* Creación de un script para crear dispositivos FALSOS según la entrada del usuario a través de configuraciones personalizadas
|
||||
* ...en este punto, la limitación es más la creatividad que la capacidad (puede haber casos extremos y la necesidad de admitir más controles de formulario para la entrada del usuario fuera de las configuraciones personalizadas, pero probablemente se entienda la idea)
|
||||
|
||||
Si desea desarrollar un plugin, verifique la estructura del complemento existente. Una vez que el usuario guarda la configuración, debe eliminarla manualmente del archivo `pialert.conf` si desea reinicializarla desde el `config.json` del complemento.
|
||||
|
||||
Nuevamente, lea atentamente lo siguiente si desea contribuir usted mismo con un complemento. Este archivo de documentación puede estar desactualizado, así que verifique también los complementos de muestra.
|
||||
|
||||
## ⚠ Aviso legal
|
||||
|
||||
Siga lo siguiente con mucho cuidado y consulte los plugin(s) de ejemplo si desea escribir uno usted mismo. La interfaz de usuario del complemento no es mi prioridad en este momento, y estaré encantado de aprobar PRs si está interesado en ampliar/mejorar la experiencia de la interfaz de usuario. Mejoras de ejemplo para tomar:
|
||||
|
||||
* Hacer que las tablas se puedan ordenar/filtrar
|
||||
* Utilizar el mismo enfoque para mostrar los datos de la tabla que en la sección Dispositivos (resuelve arriba)
|
||||
* Agregar controles de formulario admitidos para mostrar los datos (los actualmente admitidos se enumeran en la sección "Configuración de la interfaz de usuario en definiciones de columna de base de datos" a continuación)
|
||||
*...
|
||||
|
||||
## ❗ Problemas conocidos:
|
||||
|
||||
Es de esperar que estos problemas se solucionen con el tiempo, así que no los informe. En cambio, si sabe cómo, no dude en investigar y enviar un PR para solucionar lo siguiente. Mantenga los RP pequeños ya que es más fácil aprobarlos:
|
||||
|
||||
* Los objetos de plugins existentes a veces no se interpretan correctamente y en su lugar se crea un nuevo objeto, lo que genera entradas duplicadas.
|
||||
* Ocasionalmente (experimentado dos veces) se cuelga el archivo de script del complemento de procesamiento.
|
||||
La interfaz de usuario muestra valores obsoletos hasta que se actualizan los puntos finales de la API.
|
||||
|
||||
## Descripción general de la estructura del archivo del plugin
|
||||
|
||||
> ⚠️El nombre de la carpeta debe ser el mismo que el valor del nombre del código en: `"code_name": "<value>"`
|
||||
> El prefijo único debe ser único en comparación con los otros prefijos de configuración, por ejemplo: el prefijo `APPRISE` ya está en uso.
|
||||
|
||||
| Archivo | Requerido (tipo de plugin) | Descripción |
|
||||
|----------------------|----------------------|----------------------|
|
||||
| `config.json` | Sí | Contiene la configuración del complemento (manifiesto), incluida la configuración disponible para el usuario. |
|
||||
| `script.py` | Sí (script) | El script Python en sí |
|
||||
| `last_result.log` | Sí (script) |El archivo utilizado para la interfaz entre PiAlert y el plugin (script). |
|
||||
| `script.log` | No | Salida de registro (recomendado) |
|
||||
| `README.md` | No | Cualquier consideración de configuración o descripción general (recomendado) |
|
||||
|
||||
Más sobre detalles a continuación.
|
||||
|
||||
### Orden de columnas y valores
|
||||
|
||||
| Orden | Columna representada | Requerido | Descripción |
|
||||
|----------------------|----------------------|----------------------|----------------------|
|
||||
| 0 | `Object_PrimaryID` | Sí | El ID principal utilizado para agrupar eventos en. |
|
||||
| 1 | `Object_SecondaryID` | No | ID secundaria opcional para crear una relación entre otras entidades, como una dirección MAC |
|
||||
| 2 | `DateTime` | Sí | Cuando el evento ocurrió en el formato `2023-01-02 15:56:30` |
|
||||
| 3 | `Watched_Value1` | Sí | Un valor que se observa y los usuarios pueden recibir notificaciones si cambia en comparación con la entrada guardada anteriormente. Por ejemplo dirección IP |
|
||||
| 4 | `Watched_Value2` | No | Como en el caso anterior |
|
||||
| 5 | `Watched_Value3` | No | Como en el caso anterior |
|
||||
| 6 | `Watched_Value4` | No | Como en el caso anterior |
|
||||
| 7 | `Extra` | No | Cualquier otro dato que desee pasar y mostrar en PiAlert y las notificaciones |
|
||||
| 8 | `ForeignKey` | No | Una clave externa que se puede utilizar para vincular al objeto principal (normalmente una dirección MAC) |
|
||||
|
||||
> [!NOTE]
|
||||
> La deduplicación se ejecuta una vez por hora en la tabla de base de datos `Plugins_Objects` y las entradas duplicadas con el mismo valor en las columnas `Object_PrimaryID`, `Object_SecondaryID`, `Plugin` (autocompletadas según el `unique_prefix` del complemento), Se eliminan los `UserData` (que se pueden completar con el tipo de columna `"type": "textbox_save"`).
|
||||
# Estructura config.json
|
||||
|
||||
## Fuentes de datos admitidas
|
||||
|
||||
Actualmente, estas fuentes de datos son compatibles (valid `data_source` value).
|
||||
|
||||
| Nombre | `data_source` valor | Necesita devolver una "tabla" | Descripción general (más detalles en esta página a continuación) |
|
||||
|----------------------|----------------------|----------------------|----------------------|
|
||||
| Script | `script` | No | Ejecuta cualquier comando de Linux en la configuración `CMD`. |
|
||||
| Pialert DB query | `pialert-db-query` | Sí | Ejecuta una consulta SQL en la base de datos PiAlert en la configuración `CMD`. |
|
||||
| Template | `template` | No | Se utiliza para generar configuraciones internas, como valores predeterminados. |
|
||||
| External SQLite DB query | `sqlite-db-query` | Sí | Ejecuta una consulta SQL desde la configuración `CMD` en una base de datos SQLite externa asignada en la configuración `DB_PATH`. |
|
||||
|
||||
|
||||
> 🔎Ejemplo
|
||||
>```json
|
||||
>"data_source": "pialert-db-query"
|
||||
>```
|
||||
Cualquiera de las fuentes de datos anteriores debe devolver una "tabla" con la estructura exacta descrita anteriormente.
|
||||
|
||||
Puede mostrar u ocultar la interfaz de usuario en la página "Complementos" y en la pestaña "Complementos" en los dispositivos a través de la propiedad `show_ui`:
|
||||
|
||||
> 🔎Ejemplo
|
||||
>```json
|
||||
> "show_ui": true,
|
||||
> ```
|
||||
|
||||
### "data_source": "script"
|
||||
|
||||
Si `data_source` está configurado en `script`, la configuración `CMD` (que usted especifica en la sección de matriz `settings` en `config.json`) debe contener un comando ejecutable de Linux, que genera un `last_result.log `archivo. Este archivo debe almacenarse en la misma carpeta que el complemento.
|
||||
|
||||
El contenido del archivo `last_result.log` debe contener las columnas tal como se definen en la sección "Orden y valores de las columnas" anterior. El orden de las columnas no se puede cambiar. Después de cada escaneo, debe contener solo los resultados del último escaneo/ejecución.
|
||||
|
||||
- El formato de `last_result.log` es un archivo tipo `csv` con la tubería `|` como separador.
|
||||
- Es necesario suministrar 9 (nueve) valores, por lo que cada línea debe contener 8 separadores de tuberías. Los valores vacíos se representan con "nulo".
|
||||
- No muestre "encabezados" para estas "columnas".
|
||||
- Cada resultado del escaneo/entrada de evento debe estar en una nueva línea.
|
||||
- Puede encontrar qué "columnas" deben estar presentes y si el valor es obligatorio u opcional, en la sección "Orden de columnas y valores".
|
||||
- El orden de estas "columnas" no se puede cambiar.
|
||||
|
||||
### 👍 Consejos para Python script.py
|
||||
|
||||
El [Undicoverables plugins `script.py` file](/front/plugins/undiscoverables/script.py) es un ejemplo bueno y simple para comenzar si está considerando crear un complemento personalizado. Utiliza la [`plugin_helper.py` library](/front/plugins/plugin_helper.py) que simplifica significativamente la creación de su script personalizado.
|
||||
|
||||
#### 🔎 Ejemplos de last_result.log
|
||||
|
||||
CSV válido:
|
||||
|
||||
```csv
|
||||
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898|null|null|null|null
|
||||
https://www.duckduckgo.com|192.168.0.1|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|ff:ee:ff:11:ff:11
|
||||
|
||||
```
|
||||
|
||||
CSV no válido con diferentes errores en cada línea:
|
||||
|
||||
```csv
|
||||
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898||null|null|null
|
||||
https://www.duckduckgo.com|null|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|
|
||||
|https://www.duckduckgo.com|null|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|null
|
||||
null|192.168.1.1|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine
|
||||
https://www.duckduckgo.com|192.168.1.1|2023-01-02 15:56:30|null|0.9898|null|null|Best search engine
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898|||
|
||||
https://www.google.com|null|2023-01-02 15:56:30|200|0.7898|
|
||||
|
||||
```
|
||||
|
||||
### "data_source": "pialert-db-query"
|
||||
|
||||
Si `data_source` está configurado en `pialert-db-query`, la configuración `CMD` debe contener una consulta SQL que represente las columnas como se define en la sección "Orden y valores de las columnas" anterior. El orden de las columnas es importante.
|
||||
|
||||
Esta consulta SQL se ejecuta en el archivo de base de datos SQLite `pialert.db`.
|
||||
|
||||
> 🔎Ejemplo
|
||||
>
|
||||
> SQL query example:
|
||||
>
|
||||
> ```SQL
|
||||
> SELECT dv.dev_Name as Object_PrimaryID,
|
||||
> cast(dv.dev_LastIP as VARCHAR(100)) || ':' || cast( SUBSTR(ns.Port ,0, INSTR(ns.Port , '/')) as VARCHAR(100)) as Object_SecondaryID,
|
||||
> datetime() as DateTime,
|
||||
> ns.Service as Watched_Value1,
|
||||
> ns.State as Watched_Value2,
|
||||
> 'null' as Watched_Value3,
|
||||
> 'null' as Watched_Value4,
|
||||
> ns.Extra as Extra,
|
||||
> dv.dev_MAC as ForeignKey
|
||||
> FROM
|
||||
> (SELECT * FROM Nmap_Scan) ns
|
||||
> LEFT JOIN
|
||||
> (SELECT dev_Name, dev_MAC, dev_LastIP FROM Devices) dv
|
||||
> ON ns.MAC = dv.dev_MAC
|
||||
> ```
|
||||
>
|
||||
> Ejemplo de configuración de `CMD` requerida con la consulta anterior (puede configurar `"type": "label"` si desea que no se pueda editar en la interfaz de usuario):
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "function": "CMD",
|
||||
> "type": "text",
|
||||
> "default_value":"SELECT dv.dev_Name as Object_PrimaryID, cast(dv.dev_LastIP as VARCHAR(100)) || ':' || cast( SUBSTR(ns.Port ,0, INSTR(ns.Port , '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, ns.Service as Watched_Value1, ns.State as Watched_Value2, 'null' as Watched_Value3, 'null' as Watched_Value4, ns.Extra as Extra FROM (SELECT * FROM Nmap_Scan) ns LEFT JOIN (SELECT dev_Name, dev_MAC, dev_LastIP FROM Devices) dv ON ns.MAC = dv.dev_MAC",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "SQL to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "This SQL query is used to populate the coresponding UI tables under the Plugins section."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
### "data_source": "template"
|
||||
|
||||
Se utiliza para inicializar la configuración interna. Consulte el plugin `newdev_template` para obtener más detalles.
|
||||
|
||||
### "data_source": "sqlite-db-query"
|
||||
|
||||
Puede ejecutar una consulta SQL en una base de datos externa conectada a la base de datos PiALert actual mediante un prefijo temporal `EXTERNAL.`. El archivo de base de datos SQLite externo debe asignarse en el contenedor a la ruta especificada en la configuración `DB_PATH`:
|
||||
|
||||
> 🔎Ejemplo
|
||||
>
|
||||
>```json
|
||||
> ...
|
||||
>{
|
||||
> "function": "DB_PATH",
|
||||
> "type": "readonly",
|
||||
> "default_value":"/etc/pihole/pihole-FTL.db",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "DB Path"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "Required setting for the <code>sqlite-db-query</code> plugin type. Is used to mount an external SQLite database and execute the SQL query stored in the <code>CMD</code> setting."
|
||||
> }]
|
||||
> }
|
||||
> ...
|
||||
>```
|
||||
|
||||
La consulta SQL real que desea ejecutar se almacena como una configuración "CMD", similar al tipo de complemento "pialert-db-query".
|
||||
|
||||
> 🔎Ejemplo
|
||||
>
|
||||
> Observe el prefijo "EXTERNO".
|
||||
>
|
||||
>```json
|
||||
>{
|
||||
> "function": "CMD",
|
||||
> "type": "text",
|
||||
> "default_value":"SELECT hwaddr as Object_PrimaryID, cast('http://' || (SELECT ip FROM EXTERNAL.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1) as VARCHAR(100)) || ':' || cast( SUBSTR((SELECT name FROM EXTERNAL.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1), 0, INSTR((SELECT name FROM EXTERNAL.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1), '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, macVendor as Watched_Value1, lastQuery as Watched_Value2, (SELECT name FROM EXTERNAL.network_addresses WHERE network_id = id ORDER BY lastseen DESC, ip LIMIT 1) as Watched_Value3, 'null' as Watched_Value4, '' as Extra, hwaddr as ForeignKey FROM EXTERNAL.network WHERE hwaddr NOT LIKE 'ip-%' AND hwaddr <> '00:00:00:00:00:00'; ",
|
||||
> "options": [],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" : [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "SQL to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "This SQL query is used to populate the coresponding UI tables under the Plugins section. This particular one selects data from a mapped PiHole SQLite database and maps it to the corresponding Plugin columns."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
## 🕳 Filtros
|
||||
|
||||
Las entradas de complementos se pueden filtrar según los valores ingresados en los campos de filtro. El cuadro de texto/campo `txtMacFilter` contiene la dirección Mac del dispositivo actualmente visto o simplemente una dirección Mac que está disponible en la cadena de consulta `mac`.
|
||||
|
||||
| Propiedad | Requerido | Descripción |
|
||||
|----------------------|----------------------|----------------------|
|
||||
| `compare_column` | Sí | El nombre de la columna del complemento cuyo valor se utiliza para comparar (**Lado izquierdo** de la ecuación) |
|
||||
| `compare_operator` | Sí | Operador de comparación de JavaScript |
|
||||
| `compare_field_id` | Sí | El `id` de un campo de texto de entrada que contiene un valor se utiliza para comparar (**Lado derecho** de la ecuación)|
|
||||
| `compare_js_template` | Sí | Código JavaScript utilizado para convertir el lado izquierdo y derecho de la ecuación. `{valor}` se reemplaza con valores de entrada. |
|
||||
| `compare_use_quotes` | Sí | Si es "verdadero", entonces el resultado final de "compare_js_template" lo envolví entre comillas `"`. Úselo para comparar cadenas. |
|
||||
|
||||
|
||||
> 🔎Ejemplo:
|
||||
>
|
||||
> ```json
|
||||
> "data_filters": [
|
||||
> {
|
||||
> "compare_column" : "Object_PrimaryID",
|
||||
> "compare_operator" : "==",
|
||||
> "compare_field_id": "txtMacFilter",
|
||||
> "compare_js_template": "'{value}'.toString()",
|
||||
> "compare_use_quotes": true
|
||||
> }
|
||||
> ],
|
||||
> ```
|
||||
|
||||
1. En la página `pluginsCore.php` hay un campo de entrada con el ID `txtMacFilter`:
|
||||
|
||||
```html
|
||||
<input class="form-control" id="txtMacFilter" type="text" value="--">
|
||||
```
|
||||
|
||||
2. Este campo de entrada se inicializa mediante la cadena de consulta `&mac=`.
|
||||
|
||||
3. Luego, la aplicación procede a utilizar este valor de Mac de este campo y lo compara con el valor del campo de la base de datos `Object_PrimaryID`. El `compare_operator` es `==`.
|
||||
|
||||
4. Ambos valores, del campo de la base de datos `Object_PrimaryID` y del `txtMacFilter` se empaquetan y evalúan con `compare_js_template`, es decir, `'{value}.toString()'`.
|
||||
|
||||
5. `compare_use_quotes` está establecido en `true`, por lo que `'{value}'.toString()` está entre comillas `"`.
|
||||
|
||||
6. Esto da como resultado, por ejemplo, este código:
|
||||
|
||||
```javascript
|
||||
// left part of teh expression coming from compare_column and right from the input field
|
||||
// notice the added quotes ()") around the left and right part of teh expression
|
||||
"eval('ac:82:ac:82:ac:82".toString()')" == "eval('ac:82:ac:82:ac:82".toString()')"
|
||||
```
|
||||
|
||||
7. Los filtros solo se aplican si se especifica un filtro y `txtMacFilter` no está `indefinido` ni está vacío (`--`).
|
||||
|
||||
### 🗺 Mapear los resultados del complemento en una tabla de base de datos
|
||||
|
||||
PiAlert tomará los resultados de la ejecución del complemento e insertará estos resultados en una tabla de base de datos, si un complemento contiene la propiedad `"mapped_to_table"` en la raíz `config.json`. El mapeo de las columnas se define en la matriz `database_column_definitions`.
|
||||
|
||||
Este enfoque se utiliza para implementar el complemento "DHCPLSS". El script analiza todos los archivos "dhcp.leases" proporcionados, obtiene los resultados en el formato de tabla genérica descrito en la sección "Orden y valores de las columnas" anterior y toma valores individuales y los inserta en la tabla de base de datos `"CurrentScan"` en PiAlert. base de datos. Todo esto se logra mediante:
|
||||
|
||||
> [!NOTE]
|
||||
> Si los resultados se asignan a la tabla "CurrentScan", los datos se incluyen en el ciclo de escaneo normal, por lo que, por ejemplo, se envían notificaciones para los dispositivos.
|
||||
|
||||
1) Especificar la tabla de la base de datos en la que se insertan los resultados definiendo `"mapped_to_table": "CurrentScan"` en la raíz del archivo `config.json` como se muestra a continuación:
|
||||
|
||||
```json
|
||||
{
|
||||
"code_name": "dhcp_leases",
|
||||
"unique_prefix": "DHCPLSS",
|
||||
...
|
||||
"data_source": "script",
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"mapped_to_table": "CurrentScan",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
2) Definir la columna de destino con la propiedad `mapped_to_column` para columnas individuales en la matriz `database_column_definitions` del archivo `config.json`. Por ejemplo, en el complemento `DHCPLSS`, necesitaba asignar el valor de la columna `Object_PrimaryID` devuelta por el complemento a la columna `cur_MAC` en la tabla `CurrentScan` de la base de datos PiAlert. Observe el par clave-valor `"mapped_to_column": "cur_MAC"` en el siguiente ejemplo.
|
||||
|
||||
```json
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_mac",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "MAC address"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
3) Eso es todo. PiAlert se encarga del resto. Recorre los objetos descubiertos por el complemento, toma los resultados línea por línea y los inserta en la tabla de la base de datos especificada en `"mapped_to_table"`. Las columnas se traducen de las columnas del complemento genérico a la tabla de destino a través de la propiedad `"mapped_to_column"` en las definiciones de las columnas.
|
||||
|
||||
#### Parámetros
|
||||
|
||||
La matriz `params` en `config.json` se utiliza para permitir al usuario cambiar los parámetros del script ejecutado. Por ejemplo, el usuario quiere monitorear una URL específica.
|
||||
|
||||
> 🔎 Ejemplo:
|
||||
> Pasar configuraciones definidas por el usuario a un comando. Digamos que desea tener un script que se llame con un parámetro definido por el usuario llamado "urls":
|
||||
>
|
||||
> ```bash
|
||||
> root@server# python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com
|
||||
> ```
|
||||
|
||||
* Puede permitir que el usuario agregue URL a una configuración con la propiedad `función` establecida en un nombre personalizado, como `urls_to_check` (este no es un nombre reservado de la sección "Configuraciones admitidas valores de `función`" a continuación).
|
||||
* Usted especifica el parámetro `urls` en la sección `params` de `config.json` de la siguiente manera (`WEBMON_` es el prefijo del complemento que se agrega automáticamente a todas las configuraciones):
|
||||
```json
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "urls",
|
||||
"type" : "setting",
|
||||
"value" : "WEBMON_urls_to_check"
|
||||
}]
|
||||
}
|
||||
```
|
||||
* Luego usa esta configuración como parámetro de entrada para su comando en la configuración `CMD`. Observe `urls={urls}` en el siguiente json:
|
||||
|
||||
```json
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "text",
|
||||
"default_value":"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command to run"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
Durante la ejecución del script, la aplicación tomará el comando `"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}"`, tomará el comodín `{urls}` y lo reemplazará con el valor de la configuración `WEBMON_urls_to_check`. Esto es porque:
|
||||
1) La aplicación verifica las entradas de "parámetros".
|
||||
2) Encuentra `"nombre": "urls"`
|
||||
3) Comprueba el tipo de parámetros de `urls` y encuentra`"type" : "setting"`
|
||||
4) Obtiene el nombre de la configuración de `"value" : "WEBMON_urls_to_check"`
|
||||
- IMPORTANTE: en `config.json` esta configuración se identifica con `"function":"urls_to_check"`, not `"function":"WEBMON_urls_to_check"`
|
||||
- También puedes usar una configuración global o una configuración de un complemento diferente
|
||||
5) The app gets the user defined value from the setting with the code name `WEBMON_urls_to_check`
|
||||
- digamos la configuración con el nombre en clave `WEBMON_urls_to_check` contiene 2 valores ingresados por el usuario:
|
||||
- `WEBMON_urls_to_check=['https://google.com','https://duck.com']`
|
||||
6) La aplicación toma el valor de `WEBMON_urls_to_check` y reemplaza el comodín `{urls}` en la configuración donde `"function":"CMD"`, por lo que pasas de:
|
||||
- `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}`
|
||||
- to
|
||||
- `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com`
|
||||
|
||||
A continuación se muestran algunas notas adicionales generales al definir "parámetros":
|
||||
|
||||
- `"name":"name_value"` - se utiliza como reemplazo de comodín en el valor de configuración `CMD` mediante el uso de llaves `{name_value}`. El comodín se reemplaza por el resultado de la configuración combinada `"valor": "param_value"` y `"type":"type_value"` a continuación.
|
||||
- `"type":"<sql|setting>"` - se utiliza para especificar el tipo de parámetros, actualmente solo se admiten 2 (`sql`,`setting`).
|
||||
- `"type":"sql"` - ejecutará la consulta SQL especificada en la propiedad `valor`. La consulta SQL debe devolver solo una columna. La columna está aplanada y separada por comas (`,`), por ejemplo: `SELECT dev_MAC from DEVICES` -> `Internet,74:ac:74:ac:74:ac,44:44:74:ac:74:ac `. Luego se usa para reemplazar los comodines en la configuración "CMD".
|
||||
- `"type":"setting"` - El nombre del código de configuración. Una combinación del valor de `unique_prefix` + `_` + valor de `function`, o de lo contrario, el nombre del código que puede encontrar en la página Configuración bajo el nombre para mostrar de configuración, p. `PIHOLE_RUN`.
|
||||
- `"value" : "param_value"` - Debe contener un nombre de código de configuración o una consulta SQL sin comodines.
|
||||
|
||||
|
||||
> 🔎Ejemplo:
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "params" : [{
|
||||
> "name" : "macs",
|
||||
> "type" : "sql",
|
||||
> "value" : "SELECT dev_MAC from DEVICES"
|
||||
> },
|
||||
> {
|
||||
> "name" : "urls",
|
||||
> "type" : "setting",
|
||||
> "value" : "WEBMON_urls_to_check"
|
||||
> },
|
||||
> {
|
||||
> "name" : "internet_ip",
|
||||
> "type" : "setting",
|
||||
> "value" : "WEBMON_SQL_internet_ip"
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
|
||||
#### ⚙ Configuración de la estructura del objeto
|
||||
|
||||
> [!NOTE]
|
||||
> El flujo de configuración y cuándo se aplican las configuraciones específicas del complemento se describen en la sección [Settings system](/docs/SETTINGS_SYSTEM.md).
|
||||
|
||||
Los atributos requeridos son:
|
||||
|
||||
- `"function": "<see Supported settings function values>"` - ¿Qué función maneja la configuración o un nombre de código único y simple?
|
||||
- `"type": "<text|integer|boolean|password|readonly|integer.select|text.select|text.multiselect|list|integer.checkbox|text.template>"` - El control de formulario utilizado para la configuración que se muestra en la página Configuración y qué valores se aceptan.
|
||||
- `"localized"` - una lista de propiedades en el nivel JSON actual que deben localizarse
|
||||
- `"name"` y `"description"` - Se muestra en la página de Configuración. Una serie de cadenas localizadas. (consulte Cadenas localizadas a continuación).
|
||||
- (optional) `"events"` - `<test|run>` - para generar un botón de ejecución al lado del campo de entrada de la configuración (no probado completamente)
|
||||
- (optional) `"override_value"` - se utiliza para determinar una anulación definida por el usuario para la configuración. Útil para complementos basados en plantillas, donde puede optar por dejar el valor actual o anularlo con el valor definido en la configuración. (trabajo en progreso)
|
||||
- (optional) `"events": ["run", "test"]` - utilizado para activar el complemento. Generalmente se usa en la configuración "EJECUTAR". No probado completamente en todos los escenarios. Mostrará un botón de reproducción al lado de la configuración y luego, después de hacer clic, se generará un evento para el backend en la tabla de la base de datos "Parámetros" para procesar el evento del front-end en la siguiente ejecución.
|
||||
|
||||
##### Valores de `función` de configuraciones admitidas
|
||||
|
||||
Puede tener cualquier nombre personalizado `"function": "my_custom_name"`; sin embargo, los que se enumeran a continuación tienen una funcionalidad específica adjunta. Si usa un nombre personalizado, la configuración se usa principalmente como parámetro de entrada para la sección `params`.
|
||||
|
||||
- `RUN` - (requerido) Especifica cuándo se ejecuta el servicio.
|
||||
- Opciones soportadas:
|
||||
- "disabled" - no ejecutar
|
||||
- "once" - ejecutar al iniciar la aplicación o en la configuración guardada
|
||||
- "schedule" - Si se incluye, se debe especificar una configuración `RUN_SCHD` para determinar cuál es el cronograma,
|
||||
- "always_after_scan" - Se ejecuta siempre después de finalizar un escaneo
|
||||
- "on_new_device" - Se ejecuta cuando se detecta un nuevo dispositivo
|
||||
- "before_config_save" - Se ejecuta antes de que la configuración se marque como guardada. Útil si su complemento necesita modificar el archivo `pialert.conf`.
|
||||
- `RUN_SCHD` - (requerido si incluye la función `RUN` anterior) La programación tipo cron se utiliza si la configuración `RUN` está establecida en `schedule`
|
||||
- `CMD` - (requerido) Qué comando se debe ejecutar.
|
||||
- `API_SQL` - (opcional) Genera una `table_` + code_name + `.json` archivo según [API docs](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md).
|
||||
- `RUN_TIMEOUT` - (opcional) Tiempo máximo de ejecución del script. Si no se especifica, se utiliza un valor predeterminado de 10 segundos para evitar que se cuelgue.
|
||||
- `WATCH` - (opcional) Qué columnas de la base de datos se vigilan en busca de cambios para este complemento en particular. Si no se especifica no se envían notificaciones.
|
||||
- `REPORT_ON` - (opcional) Envíe una notificación solo sobre estos estados. Las opciones admitidas son:
|
||||
- `new` significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId).
|
||||
- `watched-changed` - significa que las columnas seleccionadas `Watched_ValueN` cambiaron
|
||||
- `watched-not-changed` - informes incluso en eventos donde el `Watched_ValueN` seleccionado no cambió
|
||||
- `missing-in-last-scan` - si falta el objeto en comparación con escaneos anteriores
|
||||
|
||||
|
||||
> 🔎 Ejemplo:
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "function": "RUN",
|
||||
> "type": "text.select",
|
||||
> "default_value":"disabled",
|
||||
> "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
> "localized": ["name", "description"],
|
||||
> "name" :[{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "When to run"
|
||||
> }],
|
||||
> "description": [{
|
||||
> "language_code":"en_us",
|
||||
> "string" : "Enable a regular scan of your services. If you select <code>schedule</code> the scheduling settings from below are applied. If you select <code>once</code> the scan is run only once on start of the application (container) for the time specified in <a href=\"#WEBMON_RUN_TIMEOUT\"><code>WEBMON_RUN_TIMEOUT</code> setting</a>."
|
||||
> }]
|
||||
> }
|
||||
> ```
|
||||
|
||||
##### 🌍Cadenas localizadas
|
||||
|
||||
- `"language_code":"<en_us|es_es|de_de>"` - nombre de código de la cadena de idioma. Actualmente sólo se admiten estos tres. Al menos se debe definir la variante `"language_code":"en_us"`.
|
||||
- `"string"` - La cadena que se mostrará en el idioma especificado.
|
||||
|
||||
> 🔎 Ejemplo:
|
||||
>
|
||||
> ```json
|
||||
>
|
||||
> {
|
||||
> "language_code":"en_us",
|
||||
> "string" : "When to run"
|
||||
> }
|
||||
>
|
||||
> ```
|
||||
|
||||
##### Configuración de la UI en Database_column_definitions
|
||||
|
||||
La interfaz de usuario ajustará cómo se muestran las columnas en función de la definición del objeto `database_column_definitions`. Estos son los controles de formulario admitidos y la funcionalidad relacionada:
|
||||
|
||||
- Solo las columnas con `"show": true` y también con al menos una traducción al inglés se mostrarán en la interfaz de usuario.
|
||||
- Tipos soportados: `label`, `text`, `threshold`, `replace`, `device_ip`, `device_mac`, `url`. Consulte los detalles a continuación sobre cómo se comportan las columnas según el tipo.
|
||||
- `label` hace que solo se muestre una columna
|
||||
- `text` hace que una columna sea editable y se muestra un icono de guardar junto a ella.
|
||||
- Consulte a continuación para obtener información sobre "umbral", "reemplazar"
|
||||
- La propiedad `opciones` se utiliza junto con estos tipos:
|
||||
- `threshold` - La matriz `opciones` contiene objetos desde el `máximo` más bajo hasta el más alto con el `hexColor` correspondiente usado para el color de fondo del valor si es menor que el `máximo` especificado, pero mayor que el anterior en la matriz `opciones`
|
||||
- `replace` - La matriz `opciones` contiene objetos con una propiedad `equals`, que se compara con el "valor" y si los valores son los mismos, la cadena en "reemplazo" se muestra en la interfaz de usuario en lugar del "valor" real
|
||||
- `device_mac` - El valor se considera una dirección Mac y se genera un enlace que apunta al dispositivo con la dirección Mac proporcionada.
|
||||
- `device_ip` - El valor se considera una dirección IP y se genera un enlace que apunta al dispositivo con la IP dada. La IP se compara con las últimas direcciones IP detectadas y se traduce a una dirección Mac que luego se usa para el enlace en sí.
|
||||
- `url` - El valor se considera una URL por lo que se genera un enlace.
|
||||
- `textbox_save` - Se genera un cuadro de texto editable y guardable que guarda los valores en la base de datos. Diseñado principalmente para la columna de base de datos "UserData" en la tabla "Plugins_Objects".
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "threshold",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"maximum": 199,
|
||||
"hexColor": "#792D86"
|
||||
},
|
||||
{
|
||||
"maximum": 299,
|
||||
"hexColor": "#5B862D"
|
||||
},
|
||||
{
|
||||
"maximum": 399,
|
||||
"hexColor": "#7D862D"
|
||||
},
|
||||
{
|
||||
"maximum": 499,
|
||||
"hexColor": "#BF6440"
|
||||
},
|
||||
{
|
||||
"maximum": 599,
|
||||
"hexColor": "#D33115"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status code"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<i class='fa-solid fa-square-check'></i>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<i class='fa-solid fa-triangle-exclamation'></i>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<i class='fa-solid fa-circle-plus'></i>"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins.png "Screen 1"
|
||||
[screen2]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_settings.png "Screen 2"
|
||||
[screen3]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_settings.png "Screen 3"
|
||||
[screen4]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_ui.png "Screen 4"
|
||||
[screen5]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_device_details.png "Screen 5"
|
||||
14
front/plugins/arp_scan/README.md
Executable file
14
front/plugins/arp_scan/README.md
Executable file
@@ -0,0 +1,14 @@
|
||||
## Overview
|
||||
|
||||
Arp-scan is a command-line tool that uses the ARP protocol to discover and fingerprint IP hosts on the local network. An alternative to ARP scan is to enable the `PIHOLE_RUN` PiHole integration settings. The arp-scan (and other Network-scan plugin times using the `SCAN_SUBNETS` setting) time depends on the number of IP addresses to check so set this up carefully with the appropriate network mask and interface. Check the [subnets documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md) for help on setting up VLANs, what VLANs are supported, or how to figure out the network mask and your interface.
|
||||
|
||||
### Usage
|
||||
|
||||
- Go to settings and set the `SCAN_SUBNETS` setting as per [subnets documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md).
|
||||
- Enable the plugin by changing the RUN parameter from disabled to your preferred run time (usually: `schedule`).
|
||||
- Specify the schedule in the `ARPSCAN_RUN_SCHD` setting
|
||||
- Adjust the timeout if needed in the `ARPSCAN_RUN_TIMEOUT` setting
|
||||
- Review remaining settings
|
||||
- SAVE
|
||||
- Wait for the next scan to finish
|
||||
|
||||
13
front/plugins/arp_scan/README_ES.md
Executable file
13
front/plugins/arp_scan/README_ES.md
Executable file
@@ -0,0 +1,13 @@
|
||||
## Descripción general
|
||||
|
||||
Arp-scan es una herramienta de línea de comandos que utiliza el protocolo ARP para descubrir y tomar huellas digitales de hosts IP en la red local. Una alternativa al escaneo ARP es habilitar la configuración de integración de PiHole `PIHOLE_RUN`. El tiempo de arp-scan (y otros tiempos del complemento de escaneo de red que utilizan la configuración `SCAN_SUBNETS`) depende de la cantidad de direcciones IP a verificar, así que configúrelo cuidadosamente con la interfaz y la máscara de red adecuadas. Consulte la [documentación de subredes](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md) para obtener ayuda sobre cómo configurar VLAN, qué VLAN son compatibles o cómo averiguarlo. la máscara de red y su interfaz.
|
||||
|
||||
### Uso
|
||||
|
||||
- Vaya a la configuración y establezca la configuración `SCAN_SUBNETS` según la [documentación de subredes](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md).
|
||||
- Habilite el complemento cambiando el parámetro RUN de deshabilitado a su tiempo de ejecución preferido (generalmente: `schedule`).
|
||||
- Especifique el horario en la configuración `ARPSCAN_RUN_SCHD`
|
||||
- Ajuste el tiempo de espera si es necesario en la configuración `ARPSCAN_RUN_TIMEOUT`
|
||||
- Revisar las configuraciones restantes
|
||||
- Guardar
|
||||
- Espere a que finalice el siguiente escaneo.
|
||||
361
front/plugins/arp_scan/config.json
Executable file
361
front/plugins/arp_scan/config.json
Executable file
@@ -0,0 +1,361 @@
|
||||
{
|
||||
"code_name": "arp_scan",
|
||||
"unique_prefix": "ARPSCAN",
|
||||
"enabled": true,
|
||||
"data_source": "script",
|
||||
"mapped_to_table": "CurrentScan",
|
||||
"data_filters": [
|
||||
{
|
||||
"compare_column" : "Object_PrimaryID",
|
||||
"compare_operator" : "==",
|
||||
"compare_field_id": "txtMacFilter",
|
||||
"compare_js_template": "'{value}'.toString()",
|
||||
"compare_use_quotes": true
|
||||
}
|
||||
],
|
||||
"show_ui": true,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Arp-Scan (Network scan)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Arp-Scan (Escaneo de red)"
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa-solid fa-search\"></i>"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "<i class=\"fa-solid fa-search\"></i>"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "This plugin is to execute an arp-scan on the local network"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Este plugin es para ejecutar un escaneo arp en la red local."
|
||||
}
|
||||
],
|
||||
"params" : [
|
||||
{
|
||||
"name" : "subnets",
|
||||
"type" : "setting",
|
||||
"value" : "SCAN_SUBNETS",
|
||||
"base64": true
|
||||
}],
|
||||
|
||||
"settings": [
|
||||
{
|
||||
"function": "RUN",
|
||||
"type": "text.select",
|
||||
"default_value":"schedule",
|
||||
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
"localized": ["name", "description"],
|
||||
"events": ["run"],
|
||||
"name" :[
|
||||
{
|
||||
"language_code":"en_us",
|
||||
"string" : "When to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuando ejecutar"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Specify when your Network-discovery scan will run. Typical setting would be <code>schedule</code> and then you specify a cron-like schedule in the <a href=\"#ARPSCAN_RUN_SCHD\"><code>ARPSCAN_RUN_SCHD</code>setting</a> "
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Especifique cuándo se ejecutará su análisis de descubrimiento de red. La configuración típica sería <code>schedule</code> y luego se especifica una programación similar a cron en la configuración <a href=\"#ARPSCAN_RUN_SCHD\"><code>ARPSCAN_RUN_SCHD</code></a> "
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "readonly",
|
||||
"default_value": "python3 /home/pi/pialert/front/plugins/arp_scan/script.py userSubnets={subnets}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command to run. This should not be changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando para ejecutar. Esto no debe ser cambiado"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 300,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo límite de ejecución"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, se cancela el script."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": "text",
|
||||
"default_value":"*/3 * * * *",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Schedule"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#ARPSCAN_RUN\"><code>ARPSCAN_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>*/3 * * * *</code> will run the scan every 3 minutes. Will be run NEXT time the time passes. <br/> It's recommended to use the same schedule interval for all plugins responsible for discovering new devices."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#ARPSCAN_RUN\"><code>ARPSCAN_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>*/3 * * * *</code> ejecutará el escaneo cada 3 minutos. Se ejecutará la PRÓXIMA vez que pase el tiempo. <br/> Se recomienda utilizar el mismo intervalo de programación para todos los complementos que analizan su red."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "WATCH",
|
||||
"type": "text.multiselect",
|
||||
"default_value":["Watched_Value1", "Watched_Value2"],
|
||||
"options": ["Watched_Value1","Watched_Value2","Watched_Value3","Watched_Value4"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Watched"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Watched"
|
||||
}] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is IP</li><li><code>Watched_Value2</code> is Vendor</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is N/A </li></ul>"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Valor_observado1</code> es IP</li><li><code>Valor_observado2</code> es Proveedor</li><li><code>Valor_observado3</code> es Interfaz </li><li><code>Valor_observado4</code> es N/A </li></ul>"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "REPORT_ON",
|
||||
"type": "text.multiselect",
|
||||
"default_value": ["new"],
|
||||
"options": ["new", "watched-changed", "watched-not-changed", "missing-in-last-scan"],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Report on"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Informar sobre"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When should notification be sent out."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Cuándo debe enviarse una notificación."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"database_column_definitions":
|
||||
[
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "MAC"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "MAC"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"mapped_to_column": "cur_IP",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_ip",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "IP"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "IP"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value2",
|
||||
"mapped_to_column": "cur_Vendor",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Vendor"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Proveedor"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "Dummy",
|
||||
"mapped_to_column": "cur_ScanMethod",
|
||||
"mapped_to_column_data": {
|
||||
"value": "arp-scan"
|
||||
},
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Scan method"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Método de escaneo"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "DateTimeCreated",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Created"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Creado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeChanged",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[
|
||||
{
|
||||
"language_code":"en_us",
|
||||
"string" : "Changed"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cambiado"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-triangle-exclamation'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Estado"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
155
front/plugins/arp_scan/script.py
Executable file
155
front/plugins/arp_scan/script.py
Executable file
@@ -0,0 +1,155 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import argparse
|
||||
import sys
|
||||
import re
|
||||
import base64
|
||||
import subprocess
|
||||
from time import strftime
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects
|
||||
from logger import mylog, append_line_to_file
|
||||
from helper import timeNowTZ
|
||||
from const import logPath, pialertPath
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
|
||||
def main():
|
||||
# sample
|
||||
# /home/pi/pialert/front/plugins/arp_scan/script.py userSubnets=b'MTkyLjE2OC4xLjAvMjQgLS1pbnRlcmZhY2U9ZXRoMQ=='
|
||||
# the script expects a parameter in the format of userSubnets=subnet1,subnet2,...
|
||||
parser = argparse.ArgumentParser(description='Import devices from settings')
|
||||
parser.add_argument('userSubnets', nargs='+', help="list of subnets with options")
|
||||
values = parser.parse_args()
|
||||
|
||||
# Assuming Plugin_Objects is a class or function that reads data from the RESULT_FILE
|
||||
# and returns a list of objects called 'devices'.
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
# Print a message to indicate that the script is starting.
|
||||
mylog('verbose', ['[ARP Scan] In script '])
|
||||
|
||||
# holds a list of user-submitted subnets.
|
||||
mylog('verbose', ['[ARP Scan] values.userSubnets: ', values.userSubnets])
|
||||
|
||||
|
||||
# Extract the base64-encoded subnet information from the first element of the userSubnets list.
|
||||
# The format of the element is assumed to be like 'userSubnets=b<base64-encoded-data>'.
|
||||
userSubnetsParamBase64 = values.userSubnets[0].split('userSubnets=b')[1]
|
||||
|
||||
# Printing the extracted base64-encoded subnet information.
|
||||
mylog('verbose', ['[ARP Scan] userSubnetsParamBase64: ', userSubnetsParamBase64])
|
||||
|
||||
|
||||
# Decode the base64-encoded subnet information to get the actual subnet information in ASCII format.
|
||||
userSubnetsParam = base64.b64decode(userSubnetsParamBase64).decode('ascii')
|
||||
|
||||
# Print the decoded subnet information.
|
||||
mylog('verbose', ['[ARP Scan] userSubnetsParam: ', userSubnetsParam])
|
||||
|
||||
# Check if the decoded subnet information contains multiple subnets separated by commas.
|
||||
# If it does, split the string into a list of individual subnets.
|
||||
# Otherwise, create a list with a single element containing the subnet information.
|
||||
if ',' in userSubnetsParam:
|
||||
subnets_list = userSubnetsParam.split(',')
|
||||
else:
|
||||
subnets_list = [userSubnetsParam]
|
||||
|
||||
# Execute the ARP scanning process on the list of subnets (whether it's one or multiple subnets).
|
||||
# The function 'execute_arpscan' is assumed to be defined elsewhere in the code.
|
||||
unique_devices = execute_arpscan(subnets_list)
|
||||
|
||||
|
||||
for device in unique_devices:
|
||||
plugin_objects.add_object(
|
||||
primaryId=device['mac'], # MAC (Device Name)
|
||||
secondaryId=device['ip'], # IP Address
|
||||
watched1=device['ip'], # Device Name
|
||||
watched2=device.get('hw', ''), # Vendor (assuming it's in the 'hw' field)
|
||||
watched3=device.get('interface', ''), # Add the interface
|
||||
watched4='',
|
||||
extra='arp-scan',
|
||||
foreignKey="")
|
||||
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def execute_arpscan(userSubnets):
|
||||
# output of possible multiple interfaces
|
||||
arpscan_output = ""
|
||||
devices_list = []
|
||||
|
||||
# scan each interface
|
||||
|
||||
for interface in userSubnets :
|
||||
|
||||
arpscan_output = execute_arpscan_on_interface (interface)
|
||||
|
||||
mylog('verbose', ['[ARP Scan] arpscan_output: ', arpscan_output])
|
||||
|
||||
# Search IP + MAC + Vendor as regular expresion
|
||||
re_ip = r'(?P<ip>((2[0-5]|1[0-9]|[0-9])?[0-9]\.){3}((2[0-5]|1[0-9]|[0-9])?[0-9]))'
|
||||
re_mac = r'(?P<mac>([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2}))'
|
||||
re_hw = r'(?P<hw>.*)'
|
||||
re_pattern = re.compile (re_ip + '\s+' + re_mac + '\s' + re_hw)
|
||||
|
||||
devices_list_tmp = [
|
||||
{**device.groupdict(), "interface": interface}
|
||||
for device in re.finditer(re_pattern, arpscan_output)
|
||||
]
|
||||
|
||||
devices_list += devices_list_tmp
|
||||
|
||||
# mylog('debug', ['[ARP Scan] Found: Devices including duplicates ', len(devices_list) ])
|
||||
|
||||
# Delete duplicate MAC
|
||||
unique_mac = []
|
||||
unique_devices = []
|
||||
|
||||
for device in devices_list :
|
||||
if device['mac'] not in unique_mac:
|
||||
unique_mac.append(device['mac'])
|
||||
unique_devices.append(device)
|
||||
|
||||
# return list
|
||||
mylog('verbose', ['[ARP Scan] Found: Devices without duplicates ', len(unique_devices) ])
|
||||
|
||||
mylog('verbose', ["Devices List len:", len(devices_list)]) # Add this line to print devices_list
|
||||
mylog('verbose',["Devices List:", devices_list]) # Add this line to print devices_list
|
||||
|
||||
return devices_list
|
||||
|
||||
|
||||
def execute_arpscan_on_interface(interface):
|
||||
# Prepare command arguments
|
||||
arpscan_args = ['sudo', 'arp-scan', '--ignoredups', '--retry=6'] + interface.split()
|
||||
|
||||
# Execute command
|
||||
try:
|
||||
# try running a subprocess safely
|
||||
result = subprocess.check_output(arpscan_args, universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# An error occurred, handle it
|
||||
error_type = type(e).__name__ # Capture the error type
|
||||
result = ""
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
19
front/plugins/csv_backup/README.md
Executable file
19
front/plugins/csv_backup/README.md
Executable file
@@ -0,0 +1,19 @@
|
||||
### Community translations of this file
|
||||
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/csv_backup/README_ES.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/es.svg" alt="README_ES.md" style="height: 20px !important;width: 20px !important;">
|
||||
Spanish (Spain)
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/csv_backup/README_DE.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/de.svg" alt="README_DE.md" style="height: 20px !important;width: 20px !important;">
|
||||
German (Germany)
|
||||
</a>
|
||||
|
||||
## Overview
|
||||
|
||||
Plugin generating CSV backups of your Devices database table, including the network mappings. Can be used for importing your setup via the Maintenance > Backup / Restore > CSV Import feature.
|
||||
|
||||
### Usage
|
||||
|
||||
- If the devices.csv file can be overwritten or the date and time timestamp added to the name. This is toggled with the `CSVBCKP_overwrite` setting.
|
||||
19
front/plugins/csv_backup/README_DE.md
Executable file
19
front/plugins/csv_backup/README_DE.md
Executable file
@@ -0,0 +1,19 @@
|
||||
### Community-Übersetzungen dieser Datei
|
||||
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/csv_backup/README.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/us.svg" alt="README.md" style="height: 20px !important;width: 20px !important;">
|
||||
Englisch (Amerikanisch)
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/csv_backup/README_ES.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/es.svg" alt="README_ES.md" style="height: 20px !important;width: 20px !important;">
|
||||
Spanisch (Spanien)
|
||||
</a>
|
||||
|
||||
## Überblick
|
||||
|
||||
Plugin zur Erstellung von CSV-Backups Ihrer Gerätedatenbanktabelle, einschließlich der Netzwerkzuordnungen. Kann zum Importieren Ihres Setups über die Funktion Wartung > Sichern / Wiederherstellen > CSV-Import verwendet werden.
|
||||
|
||||
### Verwendung
|
||||
|
||||
- Wenn die Datei devices.csv überschrieben oder dem Namen ein Zeitstempel für Datum und Uhrzeit hinzugefügt werden kann. Dies wird mit der Einstellung "CSVBCKP_overwrite" umgeschaltet.
|
||||
19
front/plugins/csv_backup/README_ES.md
Executable file
19
front/plugins/csv_backup/README_ES.md
Executable file
@@ -0,0 +1,19 @@
|
||||
### Traducciones comunitarias de este archivo
|
||||
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/csv_backup/README.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/us.svg" alt="README.md" style="height: 20px !important;width: 20px !important;">
|
||||
Ingles (Americano)
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/csv_backup/README_DE.md">
|
||||
<img src="https://github.com/lipis/flag-icons/blob/main/flags/4x3/de.svg" alt="README_DE.md" style="height: 20px !important;width: 20px !important;">
|
||||
Aleman (Alemania)
|
||||
</a>
|
||||
|
||||
## Descripción general
|
||||
|
||||
Plugin que genera copias de seguridad CSV de la tabla de base de datos de sus dispositivos, incluidas las asignaciones de red. Se puede utilizar para importar su configuración a través de la función Mantenimiento > Copia de seguridad / Restauración > Importación CSV.
|
||||
|
||||
### Uso
|
||||
|
||||
- Si el archivo devices.csv se puede sobrescribir o se puede agregar la marca de tiempo y fecha al nombre. Esto se alterna con la configuración `CSVBCKP_overwrite`.
|
||||
265
front/plugins/csv_backup/config.json
Executable file
265
front/plugins/csv_backup/config.json
Executable file
@@ -0,0 +1,265 @@
|
||||
{
|
||||
"code_name": "csv_backup",
|
||||
"unique_prefix": "CSVBCKP",
|
||||
"enabled": true,
|
||||
"data_source": "script",
|
||||
"show_ui": false,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "CSV backup"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Backup CSV"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "CSV-Sicherung"
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa-solid fa-save\"></i>"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "<i class=\"fa-solid fa-save\"></i>"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "<i class=\"fa-solid fa-save\"></i>"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "A plugin to auto-generate devices.csv backups."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Un Plugin para generar automáticamente copias de seguridad de devices.csv."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Ein Plugin zum automatischen Generieren von devices.csv-Backups."
|
||||
}
|
||||
],
|
||||
"params" : [{
|
||||
"name" : "overwrite",
|
||||
"type" : "setting",
|
||||
"value" : "CSVBCKP_overwrite"
|
||||
},
|
||||
{
|
||||
"name" : "location",
|
||||
"type" : "setting",
|
||||
"value" : "CSVBCKP_location"
|
||||
}
|
||||
],
|
||||
|
||||
"settings": [
|
||||
{
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value":"schedule",
|
||||
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "When to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuándo ejecutar"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wann laufen"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "When the backup should be created. A daily or weekly <code>SCHEDULE</code> is a good option."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuándo se debe crear la copia de seguridad. Un <code>SCHEDULE</code> diario o semanal es una buena opción."
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wann das Backup erstellt werden soll. Ein täglicher oder wöchentlicher <code>SCHEDULE</code> ist eine gute Option."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "readonly",
|
||||
"default_value": "python3 /home/pi/pialert/front/plugins/csv_backup/script.py overwrite={overwrite} location={location}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command to run. This can not be changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando a ejecutar. Esto no se puede cambiar"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl zum Ausführen. Dies kann nicht geändert werden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": "text",
|
||||
"default_value":"0 2 * * 3",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Schedule"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#CSVBCKP_RUN\"><code>CSVBCKP_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#CSVBCKP_RUN\"><code>CSVBCKP_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Nur aktiviert, wenn Sie <code>schedule</code> in der <a href=\"#CSVBCKP_RUN\"><code>CSVBCKP_RUN</code>-Einstellung</a> auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Wenn Sie beispielsweise <code>0 4 * * *</code> eingeben, wird der Scan nach 4 Uhr morgens in der <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ ausgeführt. Code> den Sie oben festgelegt haben</a>. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 30,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo límite de ejecución"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Zeitüberschreitung"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "overwrite",
|
||||
"type": "boolean",
|
||||
"default_value":false,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Overwrite file"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Sobrescribir archivo"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Datei überschreiben"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "If the <code>devices.csv</code> file should be always overwritten. If disabled, the date and time is added to the name."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Si el archivo <code>devices.csv</code> siempre debe sobrescribirse. Si está deshabilitado, la fecha y la hora se agregan al nombre."
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wenn die Datei <code>devices.csv</code> immer überschrieben werden soll. Wenn deaktiviert, werden dem Namen Datum und Uhrzeit hinzugefügt."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "location",
|
||||
"type": "text",
|
||||
"default_value":"/home/pi/pialert/config",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "File location"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Ubicación del archivo"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Speicherort"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Where the <code>devices.csv</code> file should be saved. For example <code>/home/pi/pialert/config</code>."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Donde se debe guardar el archivo <code>devices.csv</code>. Por ejemplo <code>/home/pi/pialert/config</code>."
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wo die Datei <code>devices.csv</code> gespeichert werden soll. Zum Beispiel <code>/home/pi/pialert/config</code>."
|
||||
}]
|
||||
}
|
||||
],
|
||||
|
||||
"database_column_definitions":
|
||||
[
|
||||
|
||||
]
|
||||
}
|
||||
99
front/plugins/csv_backup/script.py
Executable file
99
front/plugins/csv_backup/script.py
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/usr/bin/env python
|
||||
# test script by running:
|
||||
# /home/pi/pialert/front/plugins/csv_backup/script.py overwrite=False location=/home/pi/pialert/config
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import argparse
|
||||
import sys
|
||||
import hashlib
|
||||
import csv
|
||||
import sqlite3
|
||||
from io import StringIO
|
||||
from datetime import datetime
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, decodeBase64
|
||||
from logger import mylog, append_line_to_file
|
||||
from helper import timeNowTZ
|
||||
from const import logPath, pialertPath
|
||||
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
def main():
|
||||
|
||||
# the script expects a parameter in the format of devices=device1,device2,...
|
||||
parser = argparse.ArgumentParser(description='Export devices data to CSV')
|
||||
parser.add_argument('overwrite', action="store", help="Specify 'TRUE' to overwrite an existing file, or 'FALSE' to create a new file")
|
||||
parser.add_argument('location', action="store", help="The directory where the CSV file will be saved")
|
||||
values = parser.parse_args()
|
||||
|
||||
overwrite = values.overwrite.split('=')[1]
|
||||
|
||||
if (overwrite.upper() == "TRUE"):
|
||||
overwrite = True
|
||||
else:
|
||||
overwrite = False
|
||||
|
||||
mylog('verbose', ['[CSVBCKP] In script'])
|
||||
|
||||
# Connect to the PiAlert SQLite database
|
||||
conn = sqlite3.connect('/home/pi/pialert/db/pialert.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Execute your SQL query
|
||||
cursor.execute("SELECT * FROM Devices")
|
||||
|
||||
# Get column names
|
||||
columns = [desc[0] for desc in cursor.description]
|
||||
|
||||
if overwrite:
|
||||
filename = 'devices.csv'
|
||||
else:
|
||||
timestamp = datetime.now().strftime('%Y%m%d%H%M%S')
|
||||
filename = f'devices_{timestamp}.csv'
|
||||
|
||||
fullPath = os.path.join(values.location.split('=')[1], filename)
|
||||
|
||||
mylog('verbose', ['[CSVBCKP] Writing file ', fullPath])
|
||||
|
||||
# Create a CSV file in the specified location
|
||||
with open(fullPath, 'w', newline='') as csvfile:
|
||||
# Initialize the CSV writer
|
||||
csv_writer = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL)
|
||||
|
||||
# Wrap the header values in double quotes and write the header row
|
||||
csv_writer.writerow([ '"' + col + '"' for col in columns])
|
||||
|
||||
# Fetch and write data rows
|
||||
for row in cursor.fetchall():
|
||||
# Wrap each value in double quotes and write the row
|
||||
csv_writer.writerow(['"' + str(value) + '"' for value in row])
|
||||
|
||||
# Close the database connection
|
||||
conn.close()
|
||||
|
||||
# Open the CSV file for reading
|
||||
with open(fullPath, 'r') as file:
|
||||
data = file.read()
|
||||
|
||||
# Replace all occurrences of """ with "
|
||||
data = data.replace('"""', '"')
|
||||
|
||||
# Open the CSV file for writing
|
||||
with open(fullPath, 'w') as file:
|
||||
file.write(data)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
7
front/plugins/db_cleanup/README.md
Executable file
7
front/plugins/db_cleanup/README.md
Executable file
@@ -0,0 +1,7 @@
|
||||
## Overview
|
||||
|
||||
Plugin to run regular database cleanup tasks. It is strongly recommended to have an hourly or at least daily schedule running.
|
||||
|
||||
### Usage
|
||||
|
||||
- Check the Settings page for details.
|
||||
181
front/plugins/db_cleanup/config.json
Executable file
181
front/plugins/db_cleanup/config.json
Executable file
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"code_name": "db_cleanup",
|
||||
"unique_prefix": "DBCLNP",
|
||||
"enabled": true,
|
||||
"data_source": "script",
|
||||
"show_ui": false,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DB cleanup"
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa-solid fa-broom\"></i>"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "A plugin to schedule database cleanup & upkeep tasks."
|
||||
}
|
||||
],
|
||||
"params" : [{
|
||||
"name" : "pluginskeephistory",
|
||||
"type" : "setting",
|
||||
"value" : "PLUGINS_KEEP_HIST"
|
||||
},
|
||||
{
|
||||
"name" : "daystokeepevents",
|
||||
"type" : "setting",
|
||||
"value" : "DAYS_TO_KEEP_EVENTS"
|
||||
},
|
||||
{
|
||||
"name" : "hourstokeepnewdevice",
|
||||
"type" : "setting",
|
||||
"value" : "HRS_TO_KEEP_NEWDEV"
|
||||
},
|
||||
{
|
||||
"name" : "pholuskeepdays",
|
||||
"type" : "setting",
|
||||
"value" : "PHOLUS_DAYS_DATA"
|
||||
}
|
||||
],
|
||||
|
||||
"settings": [
|
||||
{
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value":"schedule",
|
||||
"options": ["disabled", "once", "schedule", "always_after_scan"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "When to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuándo ejecutar"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wann laufen"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "When the cleanup should be performed. An hourly or daily <code>SCHEDULE</code> is a good option."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "readonly",
|
||||
"default_value": "python3 /home/pi/pialert/front/plugins/db_cleanup/script.py pluginskeephistory={pluginskeephistory} hourstokeepnewdevice={hourstokeepnewdevice} daystokeepevents={daystokeepevents} pholuskeepdays={pholuskeepdays}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command to run. This can not be changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando a ejecutar. Esto no se puede cambiar"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl zum Ausführen. Dies kann nicht geändert werden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": "text",
|
||||
"default_value":"*/30 * * * *",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Schedule"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#DBCLNP_RUN\"><code>DBCLNP_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#DBCLNP_RUN\"><code>DBCLNP_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Nur aktiviert, wenn Sie <code>schedule</code> in der <a href=\"#DBCLNP_RUN\"><code>DBCLNP_RUN</code>-Einstellung</a> auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Wenn Sie beispielsweise <code>0 4 * * *</code> eingeben, wird der Scan nach 4 Uhr morgens in der <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ ausgeführt. Code> den Sie oben festgelegt haben</a>. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 30,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo límite de ejecución"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Zeitüberschreitung"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"database_column_definitions":
|
||||
[
|
||||
|
||||
]
|
||||
}
|
||||
147
front/plugins/db_cleanup/script.py
Executable file
147
front/plugins/db_cleanup/script.py
Executable file
@@ -0,0 +1,147 @@
|
||||
#!/usr/bin/env python
|
||||
# test script by running:
|
||||
# /home/pi/pialert/front/plugins/db_cleanup/script.py pluginskeephistory=250 hourstokeepnewdevice=48 daystokeepevents=90
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import argparse
|
||||
import sys
|
||||
import hashlib
|
||||
import csv
|
||||
import sqlite3
|
||||
from io import StringIO
|
||||
from datetime import datetime
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, decodeBase64
|
||||
from logger import mylog, append_line_to_file
|
||||
from helper import timeNowTZ
|
||||
from const import logPath, pialertPath
|
||||
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
def main():
|
||||
|
||||
parser = argparse.ArgumentParser(description='DB cleanup tasks')
|
||||
parser.add_argument('pluginskeephistory', action="store", help="TBC")
|
||||
parser.add_argument('hourstokeepnewdevice', action="store", help="TBC")
|
||||
parser.add_argument('daystokeepevents', action="store", help="TBC")
|
||||
parser.add_argument('pholuskeepdays', action="store", help="TBC")
|
||||
|
||||
values = parser.parse_args()
|
||||
|
||||
PLUGINS_KEEP_HIST = values.pluginskeephistory.split('=')[1]
|
||||
HRS_TO_KEEP_NEWDEV = values.hourstokeepnewdevice.split('=')[1]
|
||||
DAYS_TO_KEEP_EVENTS = values.daystokeepevents.split('=')[1]
|
||||
PHOLUS_DAYS_DATA = values.pholuskeepdays.split('=')[1]
|
||||
|
||||
mylog('verbose', ['[DBCLNP] In script'])
|
||||
|
||||
|
||||
# Execute cleanup/upkeep
|
||||
cleanup_database('/home/pi/pialert/db/pialert.db', DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP_NEWDEV, PLUGINS_KEEP_HIST)
|
||||
|
||||
mylog('verbose', ['[DBCLNP] Cleanup complete file '])
|
||||
|
||||
return 0
|
||||
|
||||
#===============================================================================
|
||||
# Cleanup / upkeep database
|
||||
#===============================================================================
|
||||
def cleanup_database (dbPath, DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP_NEWDEV, PLUGINS_KEEP_HIST):
|
||||
"""
|
||||
Cleaning out old records from the tables that don't need to keep all data.
|
||||
"""
|
||||
|
||||
mylog('verbose', ['[DBCLNP] Upkeep Database:' ])
|
||||
|
||||
# Connect to the PiAlert SQLite database
|
||||
conn = sqlite3.connect(dbPath)
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Cleanup Online History
|
||||
mylog('verbose', ['[DBCLNP] Online_History: Delete all but keep latest 150 entries'])
|
||||
cursor.execute ("""DELETE from Online_History where "Index" not in (
|
||||
SELECT "Index" from Online_History
|
||||
order by Scan_Date desc limit 150)""")
|
||||
mylog('verbose', ['[DBCLNP] Optimize Database'])
|
||||
# Cleanup Events
|
||||
mylog('verbose', [f'[DBCLNP] Events: Delete all older than {str(DAYS_TO_KEEP_EVENTS)} days (DAYS_TO_KEEP_EVENTS setting)'])
|
||||
cursor.execute (f"""DELETE FROM Events
|
||||
WHERE eve_DateTime <= date('now', '-{str(DAYS_TO_KEEP_EVENTS)} day')""")
|
||||
|
||||
# Trim Plugins_History entries to less than PLUGINS_KEEP_HIST setting per unique "Plugin" column entry
|
||||
mylog('verbose', [f'[DBCLNP] Plugins_History: Trim Plugins_History entries to less than {str(PLUGINS_KEEP_HIST)} per Plugin (PLUGINS_KEEP_HIST setting)'])
|
||||
|
||||
# Build the SQL query to delete entries that exceed the limit per unique "Plugin" column entry
|
||||
delete_query = f"""DELETE FROM Plugins_History
|
||||
WHERE "Index" NOT IN (
|
||||
SELECT "Index"
|
||||
FROM (
|
||||
SELECT "Index",
|
||||
ROW_NUMBER() OVER(PARTITION BY "Plugin" ORDER BY DateTimeChanged DESC) AS row_num
|
||||
FROM Plugins_History
|
||||
) AS ranked_objects
|
||||
WHERE row_num <= {str(PLUGINS_KEEP_HIST)}
|
||||
);"""
|
||||
|
||||
cursor.execute(delete_query)
|
||||
|
||||
# Cleanup Pholus_Scan
|
||||
if PHOLUS_DAYS_DATA != 0:
|
||||
mylog('verbose', ['[DBCLNP] Pholus_Scan: Delete all older than ' + str(PHOLUS_DAYS_DATA) + ' days (PHOLUS_DAYS_DATA setting)'])
|
||||
# todo: improvement possibility: keep at least N per mac
|
||||
cursor.execute (f"""DELETE FROM Pholus_Scan
|
||||
WHERE Time <= date('now', '-{str(PHOLUS_DAYS_DATA)} day')""")
|
||||
# Cleanup New Devices
|
||||
if HRS_TO_KEEP_NEWDEV != 0:
|
||||
mylog('verbose', [f'[DBCLNP] Devices: Delete all New Devices older than {str(HRS_TO_KEEP_NEWDEV)} hours (HRS_TO_KEEP_NEWDEV setting)'])
|
||||
cursor.execute (f"""DELETE FROM Devices
|
||||
WHERE dev_NewDevice = 1 AND dev_FirstConnection < date('now', '+{str(HRS_TO_KEEP_NEWDEV)} hour')""")
|
||||
|
||||
|
||||
# De-dupe (de-duplicate) from the Plugins_Objects table
|
||||
# TODO This shouldn't be necessary - probably a concurrency bug somewhere in the code :(
|
||||
mylog('verbose', ['[DBCLNP] Plugins_Objects: Delete all duplicates'])
|
||||
cursor.execute("""
|
||||
DELETE FROM Plugins_Objects
|
||||
WHERE rowid > (
|
||||
SELECT MIN(rowid) FROM Plugins_Objects p2
|
||||
WHERE Plugins_Objects.Plugin = p2.Plugin
|
||||
AND Plugins_Objects.Object_PrimaryID = p2.Object_PrimaryID
|
||||
AND Plugins_Objects.Object_SecondaryID = p2.Object_SecondaryID
|
||||
AND Plugins_Objects.UserData = p2.UserData
|
||||
)
|
||||
""")
|
||||
|
||||
# De-Dupe (de-duplicate - remove duplicate entries) from the Pholus_Scan table
|
||||
mylog('verbose', ['[DBCLNP] Pholus_Scan: Delete all duplicates'])
|
||||
cursor.execute ("""DELETE FROM Pholus_Scan
|
||||
WHERE rowid > (
|
||||
SELECT MIN(rowid) FROM Pholus_Scan p2
|
||||
WHERE Pholus_Scan.MAC = p2.MAC
|
||||
AND Pholus_Scan.Value = p2.Value
|
||||
AND Pholus_Scan.Record_Type = p2.Record_Type
|
||||
);""")
|
||||
|
||||
conn.commit()
|
||||
|
||||
# Shrink DB
|
||||
mylog('verbose', ['[DBCLNP] Shrink Database'])
|
||||
cursor.execute ("VACUUM;")
|
||||
|
||||
# Close the database connection
|
||||
conn.close()
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
7
front/plugins/ddns_update/README.md
Executable file
7
front/plugins/ddns_update/README.md
Executable file
@@ -0,0 +1,7 @@
|
||||
## Overview
|
||||
|
||||
Plugin to run regular DDNS update tasks.
|
||||
|
||||
### Usage
|
||||
|
||||
- Check the Settings page for details.
|
||||
559
front/plugins/ddns_update/config.json
Executable file
559
front/plugins/ddns_update/config.json
Executable file
@@ -0,0 +1,559 @@
|
||||
{
|
||||
"code_name": "ddns_update",
|
||||
"unique_prefix": "DDNS",
|
||||
"enabled": true,
|
||||
"data_filters": [
|
||||
{
|
||||
"compare_column": "Object_PrimaryID",
|
||||
"compare_operator": "==",
|
||||
"compare_field_id": "txtMacFilter",
|
||||
"compare_js_template": "'{value}'.toString()",
|
||||
"compare_use_quotes": true
|
||||
}
|
||||
],
|
||||
"data_source": "script",
|
||||
"show_ui": true,
|
||||
"localized": [
|
||||
"display_name",
|
||||
"description",
|
||||
"icon"
|
||||
],
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DDNS update"
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa-solid fa-globe\"></i>"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "A plugin update the DDNS record."
|
||||
}
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"name": "prev_ip",
|
||||
"type": "sql",
|
||||
"value": "SELECT dev_LastIP FROM Devices WHERE dev_MAC = 'Internet' "
|
||||
},
|
||||
{
|
||||
"name": "DDNS_UPDATE_URL",
|
||||
"type": "setting",
|
||||
"value": "DDNS_UPDATE_URL"
|
||||
},
|
||||
{
|
||||
"name": "DDNS_USER",
|
||||
"type": "setting",
|
||||
"value": "DDNS_USER"
|
||||
},
|
||||
{
|
||||
"name": "DDNS_PASSWORD",
|
||||
"type": "setting",
|
||||
"value": "DDNS_PASSWORD"
|
||||
},
|
||||
{
|
||||
"name": "DDNS_DOMAIN",
|
||||
"type": "setting",
|
||||
"value": "DDNS_DOMAIN"
|
||||
}
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value": "schedule",
|
||||
"options": [
|
||||
"disabled",
|
||||
"once",
|
||||
"schedule",
|
||||
"always_after_scan"
|
||||
],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When to run"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Cuándo ejecutar"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Wann laufen"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When the plugin should run. An hourly or daily <code>SCHEDULE</code> is a good option."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "readonly",
|
||||
"default_value": "python3 /home/pi/pialert/front/plugins/ddns_update/script.py prev_ip={prev_ip} DDNS_UPDATE_URL={DDNS_UPDATE_URL} DDNS_USER={DDNS_USER} DDNS_PASSWORD={DDNS_PASSWORD} DDNS_DOMAIN={DDNS_DOMAIN} ",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command to run. This can not be changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando a ejecutar. Esto no se puede cambiar"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl zum Ausführen. Dies kann nicht geändert werden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": "text",
|
||||
"default_value": "*/5 * * * *",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Schedule"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#DDNS_RUN\"><code>DDNS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#DDNS_RUN\"><code>DDNS_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Nur aktiviert, wenn Sie <code>schedule</code> in der <a href=\"#DDNS_RUN\"><code>DDNS_RUN</code>-Einstellung</a> auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Wenn Sie beispielsweise <code>0 4 * * *</code> eingeben, wird der Scan nach 4 Uhr morgens in der <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ ausgeführt. Code> den Sie oben festgelegt haben</a>. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 30,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo límite de ejecución"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Zeitüberschreitung"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "DOMAIN",
|
||||
"type": "text",
|
||||
"default_value": "your_domain.freeddns.org",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DynDNS domain URL"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "URL del dominio DynDNS"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DynDNS host URL (do not include http:// or https://)."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "URL del host DynDNS (no incluya http:// o https://)."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "USER",
|
||||
"type": "text",
|
||||
"default_value": "dynu_user",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DynDNS user"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Usuario de DynDNS"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The username used to login to the DynDNS service (sometimes a full email address)."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "El nombre de usuario utilizado para iniciar sesión en el servicio DynDNS (a veces, una dirección de correo electrónico completa)."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "PASSWORD",
|
||||
"type": "password",
|
||||
"default_value": "A0000000B0000000C0000000D0000000",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DynDNS password"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Contraseña de DynDNS"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The DynDNS service access password"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "La contraseña de acceso al servicio DynDNS."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "UPDATE_URL",
|
||||
"type": "text",
|
||||
"default_value": "https://api.dynu.com/nic/update?",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "DynDNS update URL"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "URL de actualización de DynDNS"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Update URL starting with <code>http://</code> or <code>https://</code>."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Actualice la URL que comienza con <code>http://</code> o <code>https://</code>."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "WATCH",
|
||||
"type": "text.multiselect",
|
||||
"default_value": [
|
||||
"Watched_Value1"
|
||||
],
|
||||
"options": [
|
||||
"Watched_Value1",
|
||||
"Watched_Value2",
|
||||
"Watched_Value3",
|
||||
"Watched_Value4"
|
||||
],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Watched"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Visto"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Previous IP (not recommended)</li><li><code>Watched_Value2</code> unused</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "REPORT_ON",
|
||||
"type": "text.multiselect",
|
||||
"default_value":["new","watched-changed"],
|
||||
"options": ["new","watched-changed","watched-not-changed", "missing-in-last-scan"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Report on"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Informar sobre"
|
||||
} ] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
||||
}]
|
||||
}
|
||||
],
|
||||
"database_column_definitions": [
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "MAC"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Object_SecondaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_ip",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "IP"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Extra"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Dummy",
|
||||
"mapped_to_column_data": {
|
||||
"value": "DDNS"
|
||||
},
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Scan method"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Método de escaneo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeCreated",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Created"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Creado"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeChanged",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Cambiado"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value": "",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-triangle-exclamation'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Status"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Estado"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
145
front/plugins/ddns_update/script.py
Executable file
145
front/plugins/ddns_update/script.py
Executable file
@@ -0,0 +1,145 @@
|
||||
#!/usr/bin/env python
|
||||
# test script by running:
|
||||
# /home/pi/pialert/front/plugins/internet_ip/script.py TBD
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import argparse
|
||||
import sys
|
||||
import hashlib
|
||||
import csv
|
||||
import subprocess
|
||||
import re
|
||||
import base64
|
||||
import sqlite3
|
||||
from io import StringIO
|
||||
from datetime import datetime
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, decodeBase64
|
||||
from logger import mylog, append_line_to_file
|
||||
from helper import timeNowTZ, check_IP_format
|
||||
from const import logPath, pialertPath, fullDbPath
|
||||
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
def main():
|
||||
|
||||
mylog('verbose', ['[DDNS] In script'])
|
||||
|
||||
parser = argparse.ArgumentParser(description='Check internet connectivity and IP')
|
||||
|
||||
parser.add_argument('prev_ip', action="store", help="Previous IP address to compare against the current IP")
|
||||
parser.add_argument('DDNS_UPDATE_URL', action="store", help="URL for updating Dynamic DNS (DDNS)")
|
||||
parser.add_argument('DDNS_USER', action="store", help="Username for Dynamic DNS (DDNS) authentication")
|
||||
parser.add_argument('DDNS_PASSWORD', action="store", help="Password for Dynamic DNS (DDNS) authentication")
|
||||
parser.add_argument('DDNS_DOMAIN', action="store", help="Dynamic DNS (DDNS) domain name")
|
||||
|
||||
|
||||
values = parser.parse_args()
|
||||
|
||||
PREV_IP = values.prev_ip.split('=')[1]
|
||||
DDNS_UPDATE_URL = values.DDNS_UPDATE_URL.split('=')[1]
|
||||
DDNS_USER = values.DDNS_USER.split('=')[1]
|
||||
DDNS_PASSWORD = values.DDNS_PASSWORD.split('=')[1]
|
||||
DDNS_DOMAIN = values.DDNS_DOMAIN.split('=')[1]
|
||||
|
||||
# perform the new IP lookup and DDNS tasks if enabled
|
||||
ddns_update( DDNS_UPDATE_URL, DDNS_USER, DDNS_PASSWORD, DDNS_DOMAIN, PREV_IP)
|
||||
|
||||
mylog('verbose', ['[DDNS] Finished '])
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# INTERNET IP CHANGE
|
||||
#===============================================================================
|
||||
def ddns_update ( DDNS_UPDATE_URL, DDNS_USER, DDNS_PASSWORD, DDNS_DOMAIN, PREV_IP ):
|
||||
|
||||
# Update DDNS record if enabled and IP is different
|
||||
# Get Dynamic DNS IP
|
||||
|
||||
mylog('verbose', ['[DDNS] Retrieving Dynamic DNS IP'])
|
||||
dns_IP = get_dynamic_DNS_IP(DDNS_DOMAIN)
|
||||
|
||||
# Check Dynamic DNS IP
|
||||
if dns_IP == "" or dns_IP == "0.0.0.0" :
|
||||
mylog('none', ['[DDNS] Error retrieving Dynamic DNS IP'])
|
||||
|
||||
mylog('none', ['[DDNS] ', dns_IP])
|
||||
|
||||
# Check DNS Change
|
||||
if dns_IP != PREV_IP :
|
||||
mylog('none', ['[DDNS] Updating Dynamic DNS IP'])
|
||||
message = set_dynamic_DNS_IP (DDNS_UPDATE_URL, DDNS_USER, DDNS_PASSWORD, DDNS_DOMAIN)
|
||||
mylog('none', ['[DDNS] ', message])
|
||||
|
||||
# plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
# plugin_objects.add_object(
|
||||
# primaryId = 'Internet', # MAC (Device Name)
|
||||
# secondaryId = new_internet_IP, # IP Address
|
||||
# watched1 = f'Previous IP: {PREV_IP}',
|
||||
# watched2 = '',
|
||||
# watched3 = '',
|
||||
# watched4 = '',
|
||||
# extra = f'Previous IP: {PREV_IP}',
|
||||
# foreignKey = 'Internet')
|
||||
|
||||
# plugin_objects.write_result_file()
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def get_dynamic_DNS_IP (DDNS_DOMAIN):
|
||||
|
||||
# Using supplied DNS server
|
||||
dig_args = ['dig', '+short', DDNS_DOMAIN]
|
||||
|
||||
try:
|
||||
# try runnning a subprocess
|
||||
dig_output = subprocess.check_output (dig_args, universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# An error occured, handle it
|
||||
mylog('none', ['[DDNS] ERROR - ', e.output])
|
||||
dig_output = '' # probably no internet
|
||||
|
||||
# Check result is an IP
|
||||
IP = check_IP_format (dig_output)
|
||||
|
||||
# Handle invalid response
|
||||
if IP == '':
|
||||
IP = '0.0.0.0'
|
||||
|
||||
return IP
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def set_dynamic_DNS_IP (DDNS_UPDATE_URL, DDNS_USER, DDNS_PASSWORD, DDNS_DOMAIN):
|
||||
try:
|
||||
# try runnning a subprocess
|
||||
# Update Dynamic IP
|
||||
curl_output = subprocess.check_output (['curl',
|
||||
'-s',
|
||||
DDNS_UPDATE_URL +
|
||||
'username=' + DDNS_USER +
|
||||
'&password=' + DDNS_PASSWORD +
|
||||
'&hostname=' + DDNS_DOMAIN],
|
||||
universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# An error occured, handle it
|
||||
mylog('none', ['[DDNS] ERROR - ',e.output])
|
||||
curl_output = ""
|
||||
|
||||
return curl_output
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
53
front/plugins/dhcp_leases/README_ES.md
Executable file
53
front/plugins/dhcp_leases/README_ES.md
Executable file
@@ -0,0 +1,53 @@
|
||||
## Descripción general
|
||||
|
||||
Un plugin que permite importar dispositivos desde archivos DHCP.leases.
|
||||
|
||||
### Uso
|
||||
|
||||
- Especifique las rutas completas de todos los archivos `dhcp.leases` que desea importar y observar en la configuración `DHCPLSS_paths_to_check`.
|
||||
- Asigne las rutas especificadas en la configuración `DHCPLSS_paths_to_check` en su archivo `docker-compose.yml`.
|
||||
|
||||
#### Ejemplo:
|
||||
|
||||
|
||||
Extracto `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
...
|
||||
# Mapeo de diferentes archivos dhcp.leases
|
||||
- /first/location/dhcp.leases:/mnt/dhcp1.leases
|
||||
- /second/location/dhcp.leases:/mnt/dhcp2.leases
|
||||
...
|
||||
```
|
||||
|
||||
Configuración `DHCPLSS_paths_to_check`:
|
||||
|
||||
```python
|
||||
DHCPLSS_paths_to_check = ['/mnt/dhcp1.leases','/mnt/dhcp2.leases']
|
||||
```
|
||||
|
||||
### Notas
|
||||
|
||||
- No se necesita ninguna configuración específica.
|
||||
|
||||
- Este complemento espera que los archivos dhcp.leases tengan el formato **dhcpd.leases**, que es diferente al formato que utiliza PiHole.
|
||||
[dhcpd.leases(5) - Linux man page]( https://linux.die.net/man/5/dhcpd.leases#:~:text=This%20database%20is%20a%20free,file%20is%20the%20current%20one.)
|
||||
|
||||
Formato de archivo de ejemplo: _(no todas las líneas son obligatorias)_
|
||||
|
||||
```
|
||||
lease 192.168.79.15 {
|
||||
starts 0 2016/08/21 13:25:45;
|
||||
ends 0 2016/08/21 19:25:45;
|
||||
cltt 0 2016/08/21 13:25:45;
|
||||
binding state active;
|
||||
next binding state free;
|
||||
rewind binding state free;
|
||||
hardware ethernet 8c:1a:bf:11:00:ea;
|
||||
uid "\001\214\032\277\021\000\352";
|
||||
option agent.circuit-id 0:17;
|
||||
option agent.remote-id c0:a8:9:5;
|
||||
client-hostname "android-8182e21c852776e7";
|
||||
}
|
||||
```
|
||||
@@ -2,7 +2,7 @@
|
||||
"code_name": "dhcp_leases",
|
||||
"unique_prefix": "DHCPLSS",
|
||||
"enabled": true,
|
||||
"data_source": "python-script",
|
||||
"data_source": "script",
|
||||
"data_filters": [
|
||||
{
|
||||
"compare_column" : "Object_PrimaryID",
|
||||
@@ -12,11 +12,16 @@
|
||||
"compare_use_quotes": true
|
||||
}
|
||||
],
|
||||
"show_ui": true,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"mapped_to_table": "DHCP_Leases",
|
||||
"mapped_to_table": "CurrentScan",
|
||||
"display_name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "DHCP Leases"
|
||||
"string" : "DHCP Leases (Device import)"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "DHCP Leases (Importación de dispositivos)"
|
||||
}],
|
||||
"icon":[{
|
||||
"language_code":"en_us",
|
||||
@@ -25,6 +30,10 @@
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "This plugin is to import devices from dhcp.leases files."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Este plugin es para importar dispositivos desde archivos dhcp.leases."
|
||||
}],
|
||||
"params" : [
|
||||
{
|
||||
@@ -45,6 +54,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
@@ -58,34 +71,46 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "DHCP_MAC",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "devicemac",
|
||||
"type": "device_mac",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "MAC address"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Dirección MAC"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Object_SecondaryID",
|
||||
"mapped_to_column": "DHCP_IP",
|
||||
"mapped_to_column": "cur_IP",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "deviceip",
|
||||
"type": "device_ip",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "IP"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "IP"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
@@ -99,11 +124,15 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Created"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Creado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeChanged",
|
||||
"mapped_to_column": "DHCP_DateTime",
|
||||
"mapped_to_column": "cur_DateTime",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
@@ -113,6 +142,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Changed"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cambiado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -126,11 +159,15 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Is active"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Está activo"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value2",
|
||||
"mapped_to_column": "DHCP_Name",
|
||||
"mapped_to_column": "cur_Name",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
@@ -140,6 +177,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Hostname"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Nombre de host"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -153,6 +194,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Hardware"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Hardware"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
@@ -166,19 +211,27 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "State"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Estado"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "UserData",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": false,
|
||||
"type": "textboxsave",
|
||||
"type": "textbox_save",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Comments"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Comentarios"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -192,6 +245,31 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "DHCP leases file"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Archivo DHCP leases"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "ScanMethod",
|
||||
"mapped_to_column": "cur_ScanMethod",
|
||||
"mapped_to_column_data": {
|
||||
"value": "DHCPLSS"
|
||||
},
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Scan method"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Método de escaneo"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -211,19 +289,28 @@
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Estado"
|
||||
}]
|
||||
}
|
||||
],
|
||||
"settings":[
|
||||
{
|
||||
"function": "RUN",
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value":"disabled",
|
||||
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
@@ -231,10 +318,18 @@
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "When to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuándo ejecutar"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Enable import of devices from <code>dhcp.leases</code> files. If you select <code>schedule</code> the scheduling settings from below are applied. If you select <code>once</code> the scan is run only once on start of the application (container) or after you update your settings."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Habilite la importación de dispositivos desde archivos <code>dhcp.leases</code>. Si selecciona <code>schedule</code>, se aplican las configuraciones de programación de abajo. Si selecciona <code>once</code>, el análisis se ejecuta solo una vez al inicio de la aplicación (contenedor) o después de actualizar su configuración."
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -246,10 +341,18 @@
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Comando"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Comando a ejecutar"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -261,10 +364,18 @@
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Files"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Archivos"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Add all dhcp.leases mapped paths to watch. Enter full path within the container, e.g. <code>/mnt/dhcp2.leases</code>. You must map these files accordingly in your <code>docker-compose.yml</code> file."
|
||||
"string" : "Add all dhcp.leases mapped paths to watch. Enter full path within the container, e.g. <code>/mnt/dhcp2.leases</code>. You must map these files accordingly in your <code>docker-compose.yml</code> file. (If you are mapping a PiHole dhcp.leases file the path in the container must contain <code>pihole</code>, e.g.: <code>:/etc/pihole/dhcp.leases</code>)"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Agregue todas las rutas asignadas de dhcp.leases para observar. Ingrese la ruta completa dentro del contenedor, p.e. <code>/mnt/dhcp2.leases</code>. Debe asignar estos archivos en consecuencia en su archivo <code>docker-compose.yml</code>. (Si está asignando un archivo PiHole dhcp.leases, la ruta en el contenedor debe contener <code>pihole</code>, por ejemplo: <code>:/etc/pihole/dhcp.leases</code>)"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -276,10 +387,18 @@
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Schedule"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#DHCPLSS_RUN\"><code>DHCPLSS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#DHCPLSS_RUN\"><code>DHCPLSS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes. <br/> It's recommended to use the same schedule interval for all plugins responsible for discovering new devices."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#DHCPLSS_RUN\"><code>DHCPLSS_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -292,6 +411,10 @@
|
||||
"language_code":"en_us",
|
||||
"string" : "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Tiempo de espera de ejecución"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wartezeit"
|
||||
@@ -299,6 +422,10 @@
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -310,27 +437,42 @@
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Watched"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Visto"
|
||||
}] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Active </li><li><code>Watched_Value2</code> is Hostname </li><li><code>Watched_Value3</code> is hardware </li><li><code>Watched_Value4</code> is State </li></ul>"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Enviar una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> está activo </li><li><code>Watched_Value2</code> es el nombre de host </li><li><code>Watched_Value3</code > es hardware </li><li><code>Watched_Value4</code> es Estado </li></ul>"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "REPORT_ON",
|
||||
"type": "text.multiselect",
|
||||
"default_value":["new","watched-changed"],
|
||||
"options": ["new","watched-changed","watched-not-changed"],
|
||||
"options": ["new","watched-changed","watched-not-changed", "missing-in-last-scan"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Report on"
|
||||
}] ,
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Informar sobre"
|
||||
} ] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,116 +1,74 @@
|
||||
#!/usr/bin/env python
|
||||
# Based on the work of https://github.com/leiweibau/Pi.Alert
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from time import sleep, time, strftime
|
||||
import requests
|
||||
import pathlib
|
||||
import threading
|
||||
import subprocess
|
||||
import socket
|
||||
import argparse
|
||||
import io
|
||||
import sys
|
||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||
import pwd
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, handleEmpty
|
||||
from logger import mylog
|
||||
from dhcp_leases import DhcpLeases
|
||||
|
||||
curPath = str(pathlib.Path(__file__).parent.resolve())
|
||||
log_file = curPath + '/script.log'
|
||||
last_run = curPath + '/last_result.log'
|
||||
|
||||
print(last_run)
|
||||
|
||||
# Workflow
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
def main():
|
||||
|
||||
last_run_logfile = open(last_run, 'a')
|
||||
|
||||
# empty file
|
||||
mylog('verbose', ['[DHCPLSS] In script'])
|
||||
last_run_logfile = open(RESULT_FILE, 'a')
|
||||
last_run_logfile.write("")
|
||||
|
||||
parser = argparse.ArgumentParser(description='Import devices from dhcp.leases files')
|
||||
parser.add_argument('paths', action="store", help="absolute dhcp.leases file paths to check separated by ','")
|
||||
values = parser.parse_args()
|
||||
|
||||
# parse output
|
||||
newEntries = []
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
if values.paths:
|
||||
for path in values.paths.split('=')[1].split(','):
|
||||
for path in values.paths.split('=')[1].split(','):
|
||||
plugin_objects = get_entries(path, plugin_objects)
|
||||
mylog('verbose', [f'[DHCPLSS] {len(plugin_objects)} Entries found in "{path}"'])
|
||||
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
newEntries = get_entries(newEntries, path)
|
||||
def get_entries(path, plugin_objects):
|
||||
if 'pihole' in path:
|
||||
|
||||
|
||||
with open(path, 'r') as f:
|
||||
for line in f:
|
||||
row = line.rstrip().split()
|
||||
if len(row) == 5:
|
||||
plugin_objects.add_object(
|
||||
primaryId = handleEmpty(row[1]),
|
||||
secondaryId = handleEmpty(row[2]),
|
||||
watched1 = handleEmpty('True'),
|
||||
watched2 = handleEmpty(row[3]),
|
||||
watched3 = handleEmpty(row[4]),
|
||||
watched4 = handleEmpty('True'),
|
||||
extra = handleEmpty(path),
|
||||
foreignKey = handleEmpty(row[1])
|
||||
)
|
||||
else:
|
||||
leases = DhcpLeases(path)
|
||||
leasesList = leases.get()
|
||||
for lease in leasesList:
|
||||
plugin_objects.add_object(
|
||||
primaryId = handleEmpty(lease.ethernet),
|
||||
secondaryId = handleEmpty(lease.ip),
|
||||
watched1 = handleEmpty(lease.active),
|
||||
watched2 = handleEmpty(lease.hostname),
|
||||
watched3 = handleEmpty(lease.hardware),
|
||||
watched4 = handleEmpty(lease.binding_state),
|
||||
extra = handleEmpty(path),
|
||||
foreignKey = handleEmpty(lease.ethernet)
|
||||
)
|
||||
return plugin_objects
|
||||
|
||||
|
||||
for e in newEntries:
|
||||
# Insert list into the log
|
||||
service_monitoring_log(e.primaryId, e.secondaryId, e.created, e.watched1, e.watched2, e.watched3, e.watched4, e.extra, e.foreignKey )
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
def service_monitoring_log(primaryId, secondaryId, created, watched1, watched2 = '', watched3 = '', watched4 = '', extra ='', foreignKey ='' ):
|
||||
|
||||
if watched1 == '':
|
||||
watched1 = 'null'
|
||||
if watched2 == '':
|
||||
watched2 = 'null'
|
||||
if watched3 == '':
|
||||
watched3 = 'null'
|
||||
if watched4 == '':
|
||||
watched4 = 'null'
|
||||
|
||||
with open(last_run, 'a') as last_run_logfile:
|
||||
# https://www.duckduckgo.com|192.168.0.1|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|null
|
||||
last_run_logfile.write("{}|{}|{}|{}|{}|{}|{}|{}|{}\n".format(
|
||||
primaryId,
|
||||
secondaryId,
|
||||
created,
|
||||
watched1,
|
||||
watched2,
|
||||
watched3,
|
||||
watched4,
|
||||
extra,
|
||||
foreignKey
|
||||
)
|
||||
)
|
||||
# -----------------------------------------------------------------------------
|
||||
def get_entries(newEntries, path):
|
||||
|
||||
|
||||
leases = DhcpLeases(path)
|
||||
leasesList = leases.get()
|
||||
|
||||
for lease in leasesList:
|
||||
|
||||
tmpPlugObj = plugin_object_class(lease.ethernet, lease.ip, lease.active, lease.hostname, lease.hardware, lease.binding_state, path)
|
||||
|
||||
newEntries.append(tmpPlugObj)
|
||||
|
||||
return newEntries
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
class plugin_object_class:
|
||||
def __init__(self, primaryId = '',secondaryId = '', watched1 = '',watched2 = '',watched3 = '',watched4 = '',extra = '',foreignKey = ''):
|
||||
self.pluginPref = ''
|
||||
self.primaryId = primaryId
|
||||
self.secondaryId = secondaryId
|
||||
self.created = strftime("%Y-%m-%d %H:%M:%S")
|
||||
self.changed = ''
|
||||
self.watched1 = watched1
|
||||
self.watched2 = watched2
|
||||
self.watched3 = watched3
|
||||
self.watched4 = watched4
|
||||
self.status = ''
|
||||
self.extra = extra
|
||||
self.userData = ''
|
||||
self.foreignKey = foreignKey
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
11
front/plugins/dhcp_servers/README_ES.md
Executable file
11
front/plugins/dhcp_servers/README_ES.md
Executable file
@@ -0,0 +1,11 @@
|
||||
## Descripción general
|
||||
|
||||
Un plugin de muestra simple que permite detectar servidores DHCP no autorizados en la red.
|
||||
|
||||
### Uso
|
||||
|
||||
- No se necesita ninguna configuración específica.
|
||||
|
||||
### Notas
|
||||
|
||||
- No se necesita ninguna configuración específica.
|
||||
@@ -2,19 +2,32 @@
|
||||
"code_name": "dhcp_servers",
|
||||
"unique_prefix": "DHCPSRVS",
|
||||
"enabled": true,
|
||||
"data_source": "python-script",
|
||||
"data_source": "script",
|
||||
"show_ui": true,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"display_name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Rogue DHCP"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Rogue DHCP (DHCP no autorizado)"
|
||||
}],
|
||||
"icon":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "<i class=\"fa-solid fa-skull-crossbones\"></i>"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "<i class=\"fa-solid fa-skull-crossbones\"></i>"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "This plugin is to use NMAP to monitor for rogue DHCP servers."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Este complemento es para usar NMAP para monitorear servidores DHCP no autorizados."
|
||||
}],
|
||||
"params" : [],
|
||||
"database_column_definitions":
|
||||
@@ -30,6 +43,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
@@ -43,19 +60,27 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "deviceip",
|
||||
"type": "device_ip",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Server Identifier"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Identificador de servidor"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -69,6 +94,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Domain Name"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Nombre de dominio"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
@@ -82,6 +111,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Created"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Creado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -95,6 +128,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Changed"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cambiado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -108,6 +145,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Domain Name Server"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Servidor de nombres de dominio"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -121,6 +162,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "IP Offered"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "IP ofrecida"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -134,6 +179,10 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Interface"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Interfaz"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
@@ -147,19 +196,27 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Router"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Router"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "UserData",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "textboxsave",
|
||||
"type": "textbox_save",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Comments"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Comentarios"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -180,12 +237,20 @@
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Estado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -199,12 +264,17 @@
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Extra info"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Información extra"
|
||||
}]
|
||||
}
|
||||
],
|
||||
"settings":[
|
||||
{
|
||||
"function": "RUN",
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value":"disabled",
|
||||
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
@@ -212,10 +282,18 @@
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "When to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuando ejecutar"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Enable a regular scan of rogue DHCP servers. If you select <code>schedule</code> the scheduling settings from below are applied. If you select <code>once</code> the scan is run only once on start of the application (container) or after you update your settings."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Habilite un escaneo regular de servidores DHCP no autorizados. Si selecciona <code>schedule</code>, se aplican las configuraciones de programación de abajo. Si selecciona <code>once</code>, el análisis se ejecuta solo una vez al inicio de la aplicación (contenedor) o después de actualizar su configuración."
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -227,10 +305,18 @@
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Comando"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Command to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Comando a ejecutar"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -242,10 +328,18 @@
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Programar"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#DHCPSRVS_RUN\"><code>DHCPSRVS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración de <a href=\"#DHCPSRVS_RUN\"><code>DHCPSRVS_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -258,6 +352,10 @@
|
||||
"language_code":"en_us",
|
||||
"string" : "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Tiempo de espera de ejecución"
|
||||
},
|
||||
{
|
||||
"language_code":"de_de",
|
||||
"string" : "Wartezeit"
|
||||
@@ -265,6 +363,10 @@
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -276,10 +378,18 @@
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Watched"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Visto"
|
||||
}] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Domain Name Server</li><li><code>Watched_Value2</code> is IP Offered</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is Router </li></ul>"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es servidor de nombres de dominio</li><li><code>Watched_Value2</code> es IP ofrecida</li><li><code>Watched_Value3</code> es Interfaz </li><li><code>Watched_Value4</code> es enrutador </li></ul>"
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -291,12 +401,19 @@
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Report on"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Informar sobre"
|
||||
}] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,133 +1,79 @@
|
||||
#!/usr/bin/env python
|
||||
# Based on the work of https://github.com/leiweibau/Pi.Alert
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from time import sleep, time, strftime
|
||||
import requests
|
||||
import pathlib
|
||||
import threading
|
||||
import subprocess
|
||||
import socket
|
||||
import argparse
|
||||
import io
|
||||
from datetime import datetime
|
||||
|
||||
import sys
|
||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||
import pwd
|
||||
import os
|
||||
|
||||
curPath = str(pathlib.Path(__file__).parent.resolve())
|
||||
log_file = curPath + '/script.log'
|
||||
last_run = curPath + '/last_result.log'
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
print(last_run)
|
||||
from plugin_helper import Plugin_Objects, Plugin_Object
|
||||
from logger import mylog
|
||||
|
||||
# Workflow
|
||||
|
||||
def main():
|
||||
|
||||
last_run_logfile = open(last_run, 'a')
|
||||
def main():
|
||||
|
||||
mylog('verbose', ['[DHCPSRVS] In script'])
|
||||
RESULT_FILE = 'last_result.log'
|
||||
last_run_logfile = open(RESULT_FILE, 'a')
|
||||
last_run_logfile.write("")
|
||||
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
timeoutSec = 10
|
||||
|
||||
nmapArgs = ['sudo', 'nmap', '--script', 'broadcast-dhcp-discover']
|
||||
|
||||
# Execute N probes and insert in list
|
||||
dhcp_probes = 1 # N probes
|
||||
newLines = []
|
||||
newLines.append(strftime("%Y-%m-%d %H:%M:%S"))
|
||||
#dhcp_server_list_time = []
|
||||
for _ in range(dhcp_probes):
|
||||
output = subprocess.check_output (nmapArgs, universal_newlines=True, stderr=subprocess.STDOUT, timeout=(timeoutSec ))
|
||||
newLines = newLines + output.split("\n")
|
||||
|
||||
# parse output
|
||||
newEntries = []
|
||||
|
||||
duration = ""
|
||||
for line in newLines:
|
||||
try:
|
||||
dhcp_probes = 1
|
||||
newLines = [datetime.now().strftime("%Y-%m-%d %H:%M:%S")]
|
||||
|
||||
if newEntries is None:
|
||||
index = 0
|
||||
else:
|
||||
index = len(newEntries) - 1
|
||||
for _ in range(dhcp_probes):
|
||||
output = subprocess.check_output(nmapArgs, universal_newlines=True, stderr=subprocess.STDOUT, timeout=timeoutSec)
|
||||
newLines += output.split("\n")
|
||||
|
||||
if 'Response ' in line and ' of ' in line:
|
||||
newEntries.append(plugin_object_class())
|
||||
elif 'Server Identifier' in line :
|
||||
newEntries[index].primaryId = line.split(':')[1].strip()
|
||||
elif 'Domain Name' in line :
|
||||
newEntries[index].secondaryId = line.split(':')[1].strip()
|
||||
elif 'Domain Name Server' in line :
|
||||
newEntries[index].watched1 = line.split(':')[1].strip()
|
||||
elif 'IP Offered' in line :
|
||||
newEntries[index].watched2 = line.split(':')[1].strip()
|
||||
elif 'Interface' in line :
|
||||
newEntries[index].watched3 = line.split(':')[1].strip()
|
||||
elif 'Router' in line :
|
||||
newEntries[index].watched4 = line.split(':')[1].strip()
|
||||
newEntries[index].foreignKey = line.split(':')[1].strip()
|
||||
elif ('IP Address Lease Time' in line or 'Subnet Mask' in line or 'Broadcast Address' in line) :
|
||||
newEntries = []
|
||||
|
||||
newVal = line.split(':')[1].strip()
|
||||
for line in newLines:
|
||||
if 'Response ' in line and ' of ' in line:
|
||||
newEntries.append(Plugin_Object())
|
||||
elif 'Server Identifier' in line:
|
||||
newEntries[-1].primaryId = line.split(':')[1].strip()
|
||||
elif 'Domain Name' in line:
|
||||
newEntries[-1].secondaryId = line.split(':')[1].strip()
|
||||
elif 'Domain Name Server' in line:
|
||||
newEntries[-1].watched1 = line.split(':')[1].strip()
|
||||
elif 'IP Offered' in line:
|
||||
newEntries[-1].watched2 = line.split(':')[1].strip()
|
||||
elif 'Interface' in line:
|
||||
newEntries[-1].watched3 = line.split(':')[1].strip()
|
||||
elif 'Router' in line:
|
||||
value = line.split(':')[1].strip()
|
||||
newEntries[-1].watched4 = value
|
||||
newEntries[-1].foreignKey = value
|
||||
|
||||
if newEntries[index].extra == '':
|
||||
newEntries[index].extra = newVal
|
||||
else:
|
||||
newEntries[index].extra = newEntries[index].extra + ',' + newVal
|
||||
if 'IP Address Lease Time' in line or 'Subnet Mask' in line or 'Broadcast Address' in line:
|
||||
newVal = line.split(':')[1].strip()
|
||||
if newEntries[-1].extra == '':
|
||||
newEntries[-1].extra = newVal
|
||||
else:
|
||||
newEntries[-1].extra += ',' + newVal
|
||||
|
||||
|
||||
for e in newEntries:
|
||||
plugin_objects.add_object(
|
||||
primaryId=e.primaryId,
|
||||
secondaryId=e.secondaryId,
|
||||
watched1=e.watched1,
|
||||
watched2=e.watched2,
|
||||
watched3=e.watched3,
|
||||
watched4=e.watched4,
|
||||
extra=e.extra,
|
||||
foreignKey=e.foreignKey
|
||||
)
|
||||
|
||||
for e in newEntries:
|
||||
# Insert list into the log
|
||||
service_monitoring_log(e.primaryId, e.secondaryId, e.created, e.watched1, e.watched2, e.watched3, e.watched4, e.extra, e.foreignKey )
|
||||
plugin_objects.write_result_file()
|
||||
except Exception as e:
|
||||
mylog('none', ['Error in main:', str(e)])
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
def service_monitoring_log(primaryId, secondaryId, created, watched1, watched2 = '', watched3 = '', watched4 = '', extra ='', foreignKey ='' ):
|
||||
|
||||
if watched1 == '':
|
||||
watched1 = 'null'
|
||||
if watched2 == '':
|
||||
watched2 = 'null'
|
||||
if watched3 == '':
|
||||
watched3 = 'null'
|
||||
if watched4 == '':
|
||||
watched4 = 'null'
|
||||
|
||||
with open(last_run, 'a') as last_run_logfile:
|
||||
# https://www.duckduckgo.com|192.168.0.1|2023-01-02 15:56:30|200|0.9898|null|null|Best search engine|null
|
||||
last_run_logfile.write("{}|{}|{}|{}|{}|{}|{}|{}|{}\n".format(
|
||||
primaryId,
|
||||
secondaryId,
|
||||
created,
|
||||
watched1,
|
||||
watched2,
|
||||
watched3,
|
||||
watched4,
|
||||
extra,
|
||||
foreignKey
|
||||
)
|
||||
)
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
class plugin_object_class:
|
||||
def __init__(self, primaryId = '',secondaryId = '', watched1 = '',watched2 = '',watched3 = '',watched4 = '',extra = '',foreignKey = ''):
|
||||
self.pluginPref = ''
|
||||
self.primaryId = primaryId
|
||||
self.secondaryId = secondaryId
|
||||
self.created = strftime("%Y-%m-%d %H:%M:%S")
|
||||
self.changed = ''
|
||||
self.watched1 = watched1
|
||||
self.watched2 = watched2
|
||||
self.watched3 = watched3
|
||||
self.watched4 = watched4
|
||||
self.status = ''
|
||||
self.extra = extra
|
||||
self.userData = ''
|
||||
self.foreignKey = foreignKey
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
||||
main()
|
||||
|
||||
838
front/plugins/events_notifications/config.json
Executable file
838
front/plugins/events_notifications/config.json
Executable file
@@ -0,0 +1,838 @@
|
||||
{
|
||||
"code_name": "events_notifications",
|
||||
"plugin_type": "flow",
|
||||
"template_type": "database-entry",
|
||||
"unique_prefix": "EVNTNTF",
|
||||
"enabled": true,
|
||||
"data_source": "template",
|
||||
"show_ui": false,
|
||||
"localized": [
|
||||
"display_name",
|
||||
"description",
|
||||
"icon"
|
||||
],
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Known Devices"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The template used for known devices."
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa fa-check\"></i>"
|
||||
}
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"name": "target_macs",
|
||||
"type": "setting",
|
||||
"value": "KNWN_target_macs"
|
||||
},
|
||||
{
|
||||
"name": "dev_AlertDeviceDown",
|
||||
"type": "setting",
|
||||
"value": "KNWN_dev_AlertDeviceDown"
|
||||
},
|
||||
{
|
||||
"name": "dev_AlertEvents",
|
||||
"type": "setting",
|
||||
"value": "KNWN_dev_AlertEvents"
|
||||
},
|
||||
{
|
||||
"name": "trigger_ids",
|
||||
"type": "array",
|
||||
"value": "trigger.Object_PrimaryID"
|
||||
},
|
||||
{
|
||||
"name": "trigger_objects",
|
||||
"type": "array",
|
||||
"value": "trigger"
|
||||
}
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"function": "FLOW",
|
||||
"type": "json",
|
||||
"default_value": [
|
||||
{
|
||||
"name": "send_notification",
|
||||
"trigger": [
|
||||
{
|
||||
"object_event": "new",
|
||||
"object_filter": "",
|
||||
"object": "Events_Notifications"
|
||||
}
|
||||
],
|
||||
"steps": [
|
||||
{
|
||||
"step_type": "wait",
|
||||
"params": [
|
||||
{
|
||||
"days": 0,
|
||||
"hours": 0,
|
||||
"minutes": 0,
|
||||
"seconds": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step_type": "condition",
|
||||
"params": [
|
||||
{
|
||||
"left": {
|
||||
"value": "triggers[0].object['dev_DeviceID']",
|
||||
"use_quotes": true,
|
||||
"js_template": "'{value}'.toString()"
|
||||
},
|
||||
"operator": {
|
||||
"value": "==",
|
||||
"data_type": "string"
|
||||
},
|
||||
"right": {
|
||||
"value": "device_id_param",
|
||||
"use_quotes": false,
|
||||
"js_template": "'{value}'.toString()"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step_type": "condition",
|
||||
"params": [
|
||||
{
|
||||
"left": {
|
||||
"value": "check_event_repetition(device_id_param, event_type_param, repetition_count_param)",
|
||||
"use_quotes": false,
|
||||
"js_template": "{value}"
|
||||
},
|
||||
"operator": {
|
||||
"value": "==",
|
||||
"data_type": "boolean"
|
||||
},
|
||||
"right": {
|
||||
"value": true,
|
||||
"use_quotes": false,
|
||||
"js_template": "{value}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step_type": "action",
|
||||
"params": [
|
||||
{
|
||||
"type": "run_plugin",
|
||||
"params": {
|
||||
"unique_prefix": "webhook"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step_type": "action",
|
||||
"params": [
|
||||
{
|
||||
"type": "run_plugin",
|
||||
"params": {
|
||||
"unique_prefix": "mqtt"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device ID Parameter"
|
||||
}
|
||||
],
|
||||
"type": "string",
|
||||
"default_value": "1",
|
||||
"localized": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Event Type Parameter"
|
||||
}
|
||||
],
|
||||
"type": "string",
|
||||
"default_value": "device_down",
|
||||
"localized": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Repetition Count Parameter"
|
||||
}
|
||||
],
|
||||
"type": "integer",
|
||||
"default_value": 3,
|
||||
"localized": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Plugin flow"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "This flow sends a notification after 30s every time a new event is logged."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "target_macs",
|
||||
"type": "list.readonly",
|
||||
"maxLength": 50,
|
||||
"default_value": [],
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Target devices"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The MAC address of the devices to update. Uneditable. This parameter is dynamically updated via a Flow."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "text",
|
||||
"default_value": "UPDATE Devices SET dev_AlertDeviceDown = {KNWN_dev_AlertDeviceDown}, dev_AlertEvents = {KNWN_dev_AlertEvents} WHERE dev_MAC in ({target_macs})",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "UPDATE SQL"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "This SQL query is used to update target devices."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Name",
|
||||
"type": "readonly",
|
||||
"maxLength": 50,
|
||||
"default_value": "(unknown)",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Name"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The name of the device. Uneditable as internal functionality is dependent on specific new device names."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Owner",
|
||||
"type": "string",
|
||||
"maxLength": 30,
|
||||
"default_value": "House",
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Owner"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The owner of the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_DeviceType",
|
||||
"type": "string",
|
||||
"maxLength": 30,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Type"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The type of the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Vendor",
|
||||
"type": "readonly",
|
||||
"maxLength": 250,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Vendor"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The vendor of the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Favorite",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Favorite Device"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device is marked as a favorite."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Group",
|
||||
"type": "string",
|
||||
"maxLength": 10,
|
||||
"default_value": "",
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Group"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The group to which the device belongs."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Comments",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Comments"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Additional comments or notes about the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_FirstConnection",
|
||||
"type": "readonly",
|
||||
"format": "date-time",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "First Connection"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The date and time of the first connection with the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LastConnection",
|
||||
"type": "readonly",
|
||||
"format": "date-time",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Last Connection"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The date and time of the last connection with the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LastIP",
|
||||
"type": "readonly",
|
||||
"maxLength": 50,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Last IP"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The last known IP address of the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_StaticIP",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 1,
|
||||
"override_value": {
|
||||
"override": true
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Static IP"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device has a static IP address."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_ScanCycle",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 1,
|
||||
"override_value": {
|
||||
"override": true
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Scan Cycle"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The default value of the <code>Scan device</code> dropdown. Enable if newly discovered devices should be scanned."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LogEvents",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Log Events"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether events related to the device shouldbe logged."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_AlertEvents",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"override_value": {
|
||||
"override": true
|
||||
},
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Alert Events"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether events related to the device should trigger alerts. The default value of the <code>Alert All Events</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_AlertDeviceDown",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Alert Device Down"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether an alert should be triggered when the device goes down. The default value of the <code>Alert Down</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_SkipRepeated",
|
||||
"type": "integer",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Skip Repeated"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The default value of the <code>Skip repeated notifications for</code> dropdown. Enter number of <b>hours</b> for which repeated notifications should be ignored for. If you enter <code>0</code> then you get notified on all events."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LastNotification",
|
||||
"type": "readonly",
|
||||
"format": "date-time",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Last Notification"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The date and time of the last notification sent for the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_PresentLastScan",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 1,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Present Last Scan"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device should be marked as present after detected in a scan."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_NewDevice",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": true,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "New Device"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device is considered a new device. The default value of the <code>New Device</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Location",
|
||||
"type": "string",
|
||||
"maxLength": 250,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Location"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The location of the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Archived",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Archived"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device is archived. The default value of the <code>Archived</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Network_Node_MAC_ADDR",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Network Node MAC Address"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The MAC address of the network node."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Network_Node_port",
|
||||
"type": "readonly",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Network Node Port"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The port number of the network node. Uneditable."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Icon",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Icon"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The icon associated with the device. Check the <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/ICONS.md\" target=\"_blank\">documentation on icons</a> for more details."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"required": [
|
||||
"dev_MAC",
|
||||
"dev_Name",
|
||||
"dev_Owner",
|
||||
"dev_FirstConnection",
|
||||
"dev_LastConnection",
|
||||
"dev_LastIP",
|
||||
"dev_StaticIP",
|
||||
"dev_ScanCycle",
|
||||
"dev_LogEvents",
|
||||
"dev_AlertEvents",
|
||||
"dev_AlertDeviceDown",
|
||||
"dev_SkipRepeated",
|
||||
"dev_LastNotification",
|
||||
"dev_PresentLastScan",
|
||||
"dev_NewDevice",
|
||||
"dev_Location",
|
||||
"dev_Archived",
|
||||
"dev_Network_Node_MAC_ADDR",
|
||||
"dev_Network_Node_port",
|
||||
"dev_Icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
1
front/plugins/events_notifications/ignore_plugin
Executable file
1
front/plugins/events_notifications/ignore_plugin
Executable file
@@ -0,0 +1 @@
|
||||
This plugin will not be loaded
|
||||
7
front/plugins/internet_ip/README.md
Executable file
7
front/plugins/internet_ip/README.md
Executable file
@@ -0,0 +1,7 @@
|
||||
## Overview
|
||||
|
||||
Plugin to run regular Internet connectivity and IP checks.
|
||||
|
||||
### Usage
|
||||
|
||||
- Check the Settings page for details.
|
||||
430
front/plugins/internet_ip/config.json
Executable file
430
front/plugins/internet_ip/config.json
Executable file
@@ -0,0 +1,430 @@
|
||||
{
|
||||
"code_name": "internet_ip",
|
||||
"unique_prefix": "INTRNT",
|
||||
"enabled": true,
|
||||
"mapped_to_table": "CurrentScan",
|
||||
"data_filters": [
|
||||
{
|
||||
"compare_column": "Object_PrimaryID",
|
||||
"compare_operator": "==",
|
||||
"compare_field_id": "txtMacFilter",
|
||||
"compare_js_template": "'{value}'.toString()",
|
||||
"compare_use_quotes": true
|
||||
}
|
||||
],
|
||||
"data_source": "script",
|
||||
"show_ui": true,
|
||||
"localized": [
|
||||
"display_name",
|
||||
"description",
|
||||
"icon"
|
||||
],
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Internet check"
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa-solid fa-globe\"></i>"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "A plugin to check your internet connectivity and IP."
|
||||
}
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"name": "prev_ip",
|
||||
"type": "sql",
|
||||
"value": "SELECT dev_LastIP FROM Devices WHERE dev_MAC = 'Internet' "
|
||||
},
|
||||
{
|
||||
"name": "DIG_GET_IP_ARG",
|
||||
"type": "setting",
|
||||
"value": "DIG_GET_IP_ARG",
|
||||
"base64": true
|
||||
}
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value": "schedule",
|
||||
"options": [
|
||||
"disabled",
|
||||
"once",
|
||||
"schedule",
|
||||
"always_after_scan"
|
||||
],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When to run"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Cuándo ejecutar"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Wann laufen"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When the plugin should run. An hourly or daily <code>SCHEDULE</code> is a good option."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "readonly",
|
||||
"default_value": "python3 /home/pi/pialert/front/plugins/internet_ip/script.py prev_ip={prev_ip} DIG_GET_IP_ARG={DIG_GET_IP_ARG}",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command to run. This can not be changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Comando a ejecutar. Esto no se puede cambiar"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Befehl zum Ausführen. Dies kann nicht geändert werden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": "text",
|
||||
"default_value": "*/5 * * * *",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Schedule"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#INTRNT_RUN\"><code>INTRNT_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#INTRNT_RUN\"><code>INTRNT_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Nur aktiviert, wenn Sie <code>schedule</code> in der <a href=\"#INTRNT_RUN\"><code>INTRNT_RUN</code>-Einstellung</a> auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Wenn Sie beispielsweise <code>0 4 * * *</code> eingeben, wird der Scan nach 4 Uhr morgens in der <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ ausgeführt. Code> den Sie oben festgelegt haben</a>. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 30,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo límite de ejecución"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Zeitüberschreitung"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "WATCH",
|
||||
"type": "text.multiselect",
|
||||
"default_value": [
|
||||
"Watched_Value1"
|
||||
],
|
||||
"options": [
|
||||
"Watched_Value1",
|
||||
"Watched_Value2",
|
||||
"Watched_Value3",
|
||||
"Watched_Value4"
|
||||
],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Watched"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Visto"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Previous IP (not recommended)</li><li><code>Watched_Value2</code> unused</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "REPORT_ON",
|
||||
"type": "text.multiselect",
|
||||
"default_value":["new","watched-changed"],
|
||||
"options": ["new","watched-changed","watched-not-changed", "missing-in-last-scan"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Report on"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Informar sobre"
|
||||
} ] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
||||
}]
|
||||
}
|
||||
],
|
||||
"database_column_definitions": [
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "MAC"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Object_SecondaryID",
|
||||
"mapped_to_column": "cur_IP",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_ip",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "IP"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Extra"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Dummy",
|
||||
"mapped_to_column": "cur_ScanMethod",
|
||||
"mapped_to_column_data": {
|
||||
"value": "INTRNT"
|
||||
},
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Scan method"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Método de escaneo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeCreated",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Created"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Creado"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeChanged",
|
||||
"mapped_to_column": "cur_DateTime",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Changed"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Cambiado"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value": "",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-triangle-exclamation'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Status"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Estado"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
123
front/plugins/internet_ip/script.py
Executable file
123
front/plugins/internet_ip/script.py
Executable file
@@ -0,0 +1,123 @@
|
||||
#!/usr/bin/env python
|
||||
# test script by running:
|
||||
# /home/pi/pialert/front/plugins/internet_ip/script.py TBD
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import argparse
|
||||
import sys
|
||||
import hashlib
|
||||
import csv
|
||||
import subprocess
|
||||
import re
|
||||
import base64
|
||||
import sqlite3
|
||||
from io import StringIO
|
||||
from datetime import datetime
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, decodeBase64
|
||||
from logger import mylog, append_line_to_file
|
||||
from helper import timeNowTZ, check_IP_format
|
||||
from const import logPath, pialertPath, fullDbPath
|
||||
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
def main():
|
||||
|
||||
mylog('verbose', ['[INTRNT] In script'])
|
||||
|
||||
parser = argparse.ArgumentParser(description='Check internet connectivity and IP')
|
||||
|
||||
parser.add_argument('prev_ip', action="store", help="Previous IP address to compare against the current IP")
|
||||
parser.add_argument('DIG_GET_IP_ARG', action="store", help="Arguments for the 'dig' command to retrieve the IP address")
|
||||
|
||||
values = parser.parse_args()
|
||||
|
||||
PREV_IP = values.prev_ip.split('=')[1]
|
||||
DIG_GET_IP_ARG = values.DIG_GET_IP_ARG.split('=b')[1] # byte64 encoded
|
||||
|
||||
mylog('verbose', ['[INTRNT] DIG_GET_IP_ARG: ', DIG_GET_IP_ARG])
|
||||
|
||||
# Decode the base64-encoded value to get the actual value in ASCII format.
|
||||
DIG_GET_IP_ARG = base64.b64decode(DIG_GET_IP_ARG).decode('ascii')
|
||||
|
||||
mylog('verbose', [f'[INTRNT] DIG_GET_IP_ARG resolved: {DIG_GET_IP_ARG} '])
|
||||
|
||||
# perform the new IP lookup
|
||||
new_internet_IP = check_internet_IP( PREV_IP, DIG_GET_IP_ARG)
|
||||
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
plugin_objects.add_object(
|
||||
primaryId = 'Internet', # MAC (Device Name)
|
||||
secondaryId = new_internet_IP, # IP Address
|
||||
watched1 = f'Previous IP: {PREV_IP}',
|
||||
watched2 = '',
|
||||
watched3 = '',
|
||||
watched4 = '',
|
||||
extra = f'Previous IP: {PREV_IP}',
|
||||
foreignKey = 'Internet')
|
||||
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
mylog('verbose', ['[INTRNT] Finished '])
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# INTERNET IP CHANGE
|
||||
#===============================================================================
|
||||
def check_internet_IP ( PREV_IP, DIG_GET_IP_ARG ):
|
||||
|
||||
# Get Internet IP
|
||||
mylog('verbose', ['[INTRNT] - Retrieving Internet IP'])
|
||||
internet_IP = get_internet_IP(DIG_GET_IP_ARG)
|
||||
|
||||
mylog('verbose', [f'[INTRNT] Current internet_IP : {internet_IP}'])
|
||||
|
||||
# Check previously stored IP
|
||||
previous_IP = '0.0.0.0'
|
||||
|
||||
if PREV_IP is not None and len(PREV_IP) > 0 :
|
||||
previous_IP = PREV_IP
|
||||
|
||||
mylog('verbose', [f'[INTRNT] previous_IP : {previous_IP}'])
|
||||
|
||||
# logging
|
||||
append_line_to_file (logPath + '/IP_changes.log', '['+str(timeNowTZ()) +']\t'+ internet_IP +'\n')
|
||||
|
||||
return internet_IP
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def get_internet_IP (DIG_GET_IP_ARG):
|
||||
|
||||
# Using 'dig'
|
||||
dig_args = ['dig', '+short'] + DIG_GET_IP_ARG.strip().split()
|
||||
try:
|
||||
cmd_output = subprocess.check_output (dig_args, universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
mylog('none', [e.output])
|
||||
cmd_output = '' # no internet
|
||||
|
||||
# Check result is an IP
|
||||
IP = check_IP_format (cmd_output)
|
||||
|
||||
# Handle invalid response
|
||||
if IP == '':
|
||||
IP = '0.0.0.0'
|
||||
|
||||
return IP
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
11
front/plugins/known_template/README.md
Executable file
11
front/plugins/known_template/README.md
Executable file
@@ -0,0 +1,11 @@
|
||||
## Overview
|
||||
|
||||
A simple template-based plugin for known devices. You can change to overwrite values for known devices.
|
||||
|
||||
### Usage
|
||||
|
||||
- Head to **Settings** > **Known Devices** to adjust the default values.
|
||||
|
||||
### Notes
|
||||
|
||||
- This plugin generates editable settings that are then used in the `device.py` script to initialize new values. TO FIX
|
||||
11
front/plugins/known_template/README_ES.md
Executable file
11
front/plugins/known_template/README_ES.md
Executable file
@@ -0,0 +1,11 @@
|
||||
## Descripción general
|
||||
|
||||
Un plugin sencillo basado en plantillas para dispositivos conocidos. Puede cambiar para sobrescribir los valores de los dispositivos conocidos.
|
||||
|
||||
### Uso
|
||||
|
||||
- Dirígete a **Configuración** > **Dispositivos conocidos** para ajustar los valores predeterminados.
|
||||
|
||||
### Notas
|
||||
|
||||
- Este plugin genera configuraciones editables que luego se usan en el script `device.py` para inicializar nuevos valores. ARREGLAR
|
||||
683
front/plugins/known_template/config.json
Executable file
683
front/plugins/known_template/config.json
Executable file
@@ -0,0 +1,683 @@
|
||||
{
|
||||
"code_name": "known_template",
|
||||
"template_type": "database-entry",
|
||||
"unique_prefix": "KNWN",
|
||||
"enabled": true,
|
||||
"data_source": "template",
|
||||
"show_ui": false,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"display_name": [{
|
||||
"language_code": "en_us",
|
||||
"string": "Known Devices"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code": "en_us",
|
||||
"string": "The template used for known devices."
|
||||
}],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa fa-check\"></i>"
|
||||
}
|
||||
],
|
||||
"params" : [
|
||||
{
|
||||
"name" : "target_macs",
|
||||
"type" : "setting",
|
||||
"value" : "KNWN_target_macs"
|
||||
},
|
||||
{
|
||||
"name" : "dev_AlertDeviceDown",
|
||||
"type" : "setting",
|
||||
"value" : "KNWN_dev_AlertDeviceDown"
|
||||
},
|
||||
{
|
||||
"name" : "dev_AlertEvents",
|
||||
"type" : "setting",
|
||||
"value" : "KNWN_dev_AlertEvents"
|
||||
},
|
||||
{
|
||||
"name" : "trigger_ids",
|
||||
"type" : "array",
|
||||
"value" : "trigger.Object_PrimaryID"
|
||||
},
|
||||
{
|
||||
"name" : "trigger_objects",
|
||||
"type" : "array",
|
||||
"value" : "trigger"
|
||||
}
|
||||
],
|
||||
"settings":[
|
||||
{
|
||||
"function": "FLOW",
|
||||
"type": "json",
|
||||
"default_value": [{
|
||||
"name":"apply_template",
|
||||
"trigger": [
|
||||
{
|
||||
"object_event": "new",
|
||||
"object_filter": "",
|
||||
"object": "Devices"
|
||||
}
|
||||
],
|
||||
"steps": [
|
||||
{
|
||||
"step_type":"wait",
|
||||
"params": [
|
||||
{
|
||||
"days": 3,
|
||||
"hours": 0,
|
||||
"minutes": 0,
|
||||
"seconds": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step_type":"condition",
|
||||
"params": [
|
||||
{
|
||||
"left": {
|
||||
"value": "triggers[0].object['dev_NewDevice']",
|
||||
"use_quotes": true,
|
||||
"js_template": "'{value}'.toString()"
|
||||
},
|
||||
"operator": {
|
||||
"value" : "==",
|
||||
"data_type": "boolean"
|
||||
},
|
||||
"right": {
|
||||
"value": true,
|
||||
"use_quotes": false,
|
||||
"js_template": "'{value}'.toString()"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step_type":"action",
|
||||
"params": [
|
||||
{
|
||||
"type": "plugin",
|
||||
"params":
|
||||
{
|
||||
"unique_prefix": "KNWN",
|
||||
"overrides":[
|
||||
{
|
||||
"object_path": "settings.0",
|
||||
"key":"function",
|
||||
"value":"target_macs",
|
||||
"target_property":"default_value",
|
||||
"desired_value": "triggers.keys"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}],
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Plugin flow"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "This flow makes sure the template is applied to devices that are older than 3 days."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "target_macs",
|
||||
"type": "list.readonly",
|
||||
"maxLength": 50,
|
||||
"default_value": [],
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Target devices"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The MAC address of the devices to update. Uneditable. This parameter is dynamically updated via a Flow."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "text",
|
||||
"default_value":"UPDATE Devices SET dev_AlertDeviceDown = {KNWN_dev_AlertDeviceDown}, dev_AlertEvents = {KNWN_dev_AlertEvents} WHERE dev_MAC in ({target_macs})",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "UPDATE SQL"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "This SQL query is used to update target devices."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "dev_Name",
|
||||
"type": "readonly",
|
||||
"maxLength": 50,
|
||||
"default_value": "(unknown)",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Name"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The name of the device. Uneditable as internal functionality is dependent on specific new device names."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Owner",
|
||||
"type": "string",
|
||||
"maxLength": 30,
|
||||
"default_value": "House",
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Owner"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The owner of the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_DeviceType",
|
||||
"type": "string",
|
||||
"maxLength": 30,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Type"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The type of the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Vendor",
|
||||
"type": "readonly",
|
||||
"maxLength": 250,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Vendor"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The vendor of the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Favorite",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Favorite Device"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device is marked as a favorite."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Group",
|
||||
"type": "string",
|
||||
"maxLength": 10,
|
||||
"default_value": "",
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Group"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The group to which the device belongs."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Comments",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Comments"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Additional comments or notes about the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_FirstConnection",
|
||||
"type": "readonly",
|
||||
"format": "date-time",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "First Connection"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The date and time of the first connection with the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LastConnection",
|
||||
"type": "readonly",
|
||||
"format": "date-time",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Last Connection"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The date and time of the last connection with the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LastIP",
|
||||
"type": "readonly",
|
||||
"maxLength": 50,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Last IP"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The last known IP address of the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_StaticIP",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 1,
|
||||
"override_value": {
|
||||
"override": true
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Static IP"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device has a static IP address."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_ScanCycle",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 1,
|
||||
"override_value": {
|
||||
"override": true
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Scan Cycle"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The default value of the <code>Scan device</code> dropdown. Enable if newly discovered devices should be scanned."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LogEvents",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"override_value": {
|
||||
"override": false
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Log Events"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether events related to the device shouldbe logged."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "dev_AlertEvents",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"override_value": {
|
||||
"override": true
|
||||
},
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Alert Events"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether events related to the device should trigger alerts. The default value of the <code>Alert All Events</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_AlertDeviceDown",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Alert Device Down"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether an alert should be triggered when the device goes down. The default value of the <code>Alert Down</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_SkipRepeated",
|
||||
"type": "integer",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Skip Repeated"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The default value of the <code>Skip repeated notifications for</code> dropdown. Enter number of <b>hours</b> for which repeated notifications should be ignored for. If you enter <code>0</code> then you get notified on all events."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_LastNotification",
|
||||
"type": "readonly",
|
||||
"format": "date-time",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Last Notification"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The date and time of the last notification sent for the device. Uneditable - Autodetected."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_PresentLastScan",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 1,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Present Last Scan"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device should be marked as present after detected in a scan."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_NewDevice",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": true,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "New Device"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device is considered a new device. The default value of the <code>New Device</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Location",
|
||||
"type": "string",
|
||||
"maxLength": 250,
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Location"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The location of the device."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Archived",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Archived"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether the device is archived. The default value of the <code>Archived</code> checkbox."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Network_Node_MAC_ADDR",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Network Node MAC Address"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The MAC address of the network node."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Network_Node_port",
|
||||
"type": "readonly",
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Network Node Port"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The port number of the network node. Uneditable."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "dev_Icon",
|
||||
"type": "string",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Device Icon"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The icon associated with the device. Check the <a href=\"https://github.com/jokob-sk/Pi.Alert/blob/main/docs/ICONS.md\" target=\"_blank\">documentation on icons</a> for more details."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"required": [
|
||||
"dev_MAC",
|
||||
"dev_Name",
|
||||
"dev_Owner",
|
||||
"dev_FirstConnection",
|
||||
"dev_LastConnection",
|
||||
"dev_LastIP",
|
||||
"dev_StaticIP",
|
||||
"dev_ScanCycle",
|
||||
"dev_LogEvents",
|
||||
"dev_AlertEvents",
|
||||
"dev_AlertDeviceDown",
|
||||
"dev_SkipRepeated",
|
||||
"dev_LastNotification",
|
||||
"dev_PresentLastScan",
|
||||
"dev_NewDevice",
|
||||
"dev_Location",
|
||||
"dev_Archived",
|
||||
"dev_Network_Node_MAC_ADDR",
|
||||
"dev_Network_Node_port",
|
||||
"dev_Icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
|
||||
|
||||
1
front/plugins/known_template/ignore_plugin
Executable file
1
front/plugins/known_template/ignore_plugin
Executable file
@@ -0,0 +1 @@
|
||||
This plugin will not be loaded
|
||||
11
front/plugins/newdev_template/README_ES.md
Executable file
11
front/plugins/newdev_template/README_ES.md
Executable file
@@ -0,0 +1,11 @@
|
||||
## Descripción general
|
||||
|
||||
Un plugin simple basado en plantillas para dispositivos nuevos. Puede cambiar los valores predeterminados para los dispositivos recién detectados.
|
||||
|
||||
### Uso
|
||||
|
||||
- Dirígete a **Configuración** > **Nuevos dispositivos** para ajustar los valores predeterminados.
|
||||
|
||||
### Notas
|
||||
|
||||
- Este plugin genera configuraciones editables que luego se usan en el script `device.py` para inicializar nuevos valores.
|
||||
@@ -4,6 +4,7 @@
|
||||
"unique_prefix": "NEWDEV",
|
||||
"enabled": true,
|
||||
"data_source": "template",
|
||||
"show_ui": false,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"display_name": [{
|
||||
"language_code": "en_us",
|
||||
|
||||
11
front/plugins/nmap_scan/README.md
Executable file
11
front/plugins/nmap_scan/README.md
Executable file
@@ -0,0 +1,11 @@
|
||||
## Overview
|
||||
|
||||
This plugin scans your network for open ports. Only IPs are scanned that are accessible by the app container.
|
||||
|
||||
### Usage
|
||||
|
||||
- TBD
|
||||
|
||||
### Notes
|
||||
|
||||
- N/A
|
||||
11
front/plugins/nmap_scan/README_ES.md
Executable file
11
front/plugins/nmap_scan/README_ES.md
Executable file
@@ -0,0 +1,11 @@
|
||||
## Descripción general
|
||||
|
||||
Este plugin muestra todos los servicios descubiertos mediante análisis NMAP regulares. También es un complemento de muestra que muestra cómo usar una consulta SQL para mostrar datos existentes de la base de datos PiAlert.
|
||||
|
||||
### Uso
|
||||
|
||||
- La consulta SQL de la configuración `NMAPSRV_CMD` se utiliza para crear datos de origen para este complemento. El orden de las columnas y los valores deben cumplir con los especificados en la [documentación](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins).
|
||||
|
||||
### Notas
|
||||
|
||||
- N / A
|
||||
490
front/plugins/nmap_scan/config.json
Executable file
490
front/plugins/nmap_scan/config.json
Executable file
@@ -0,0 +1,490 @@
|
||||
{
|
||||
"code_name": "nmap_scan",
|
||||
"unique_prefix": "NMAP",
|
||||
"enabled": true,
|
||||
"data_source": "script",
|
||||
"data_filters": [
|
||||
{
|
||||
"compare_column" : "ForeignKey",
|
||||
"compare_operator" : "==",
|
||||
"compare_field_id": "txtMacFilter",
|
||||
"compare_js_template": "'{value}.toString()'",
|
||||
"compare_use_quotes": true
|
||||
}
|
||||
],
|
||||
"show_ui": true,
|
||||
"localized": ["display_name", "description", "icon"],
|
||||
"display_name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Services & Ports (NMAP)"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Servicios & Puertos (NMAP)"
|
||||
}],
|
||||
"icon":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "<i class=\"fa-solid fa-satellite-dish\"></i>"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "<i class=\"fa-solid fa-satellite-dish\"></i>"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "This plugin shows all services discovered by NMAP scans."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Este complemento muestra todos los servicios descubiertos por escaneos NMAP."
|
||||
}],
|
||||
"params" : [
|
||||
{
|
||||
"name" : "ips",
|
||||
"type" : "sql",
|
||||
"value" : "SELECT dev_LastIP from DEVICES",
|
||||
"timeoutMultiplier" : true
|
||||
},
|
||||
{
|
||||
"name" : "macs",
|
||||
"type" : "sql",
|
||||
"value" : "SELECT dev_MAC from DEVICES"
|
||||
},
|
||||
{
|
||||
"name" : "timeout",
|
||||
"type" : "setting",
|
||||
"value" : "NMAP_RUN_TIMEOUT"
|
||||
},
|
||||
{
|
||||
"name" : "args",
|
||||
"type" : "setting",
|
||||
"value" : "NMAP_ARGS",
|
||||
"base64" : true
|
||||
}
|
||||
],
|
||||
"database_column_definitions":
|
||||
[
|
||||
{
|
||||
"column": "Index",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": false,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "Plugin",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": false,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Device name"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Nombre del dispositivo"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Object_SecondaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Port"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Puerto"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "DateTimeCreated",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Created"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Creado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeChanged",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": false,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Changed"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cambiado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "State"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Estado"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value2",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Service"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Servicio"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value3",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "regex.url_http_https",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"type": "regex",
|
||||
"param": "([\\d.:]+)"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "HTTP/s links"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Enlaces HTTP/s"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "Watched_Value4",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": false,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "N/A"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "N/A"
|
||||
}]
|
||||
} ,
|
||||
{
|
||||
"column": "Extra",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": false,
|
||||
"type": "label",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Extra"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Extra"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "UserData",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "textbox_save",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "User data"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Datos de usuario"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "ForeignKey",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": false,
|
||||
"type": "device_mac",
|
||||
"default_value":"",
|
||||
"options": [],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "MAC"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "MAC"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value":"",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-triangle-exclamation'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": ["name"],
|
||||
"name":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Status"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Estado"
|
||||
}]
|
||||
}
|
||||
],
|
||||
"settings":[
|
||||
{
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value":"disabled",
|
||||
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "When to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Cuando ejecutar"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Enable a regular Nmap scan on your network on all devices. The scheduling settings can be found below. If you select <code>once</code> Nmap is run only once on start for the time specified in <a href=\"#NMAP_TIMEOUT\"><code>NMAP_TIMEOUT</code> setting</a>."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Habilite un escaneo regular de Nmap en su red en todos los dispositivos. Los ajustes de programación se pueden encontrar a continuación. Si selecciona <code>una vez</code>, Nmap se ejecuta solo una vez al inicio durante el tiempo especificado en la configuración de <a href=\"#NMAP_TIMEOUT\"><code>NMAP_TIMEOUT</code></a>"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "text",
|
||||
"default_value":"python3 /home/pi/pialert/front/plugins/nmap_scan/script.py ips={ips} macs={macs} timeout={timeout} args={args}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "SQL to run"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Consulta SQL"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "This calls the script responsible for executing the NMAP scan."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Esto llama al script responsable de ejecutar el escaneo NMAP."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "ARGS",
|
||||
"type": "text",
|
||||
"default_value":"-p -10000",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Arguments"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Argumentos"
|
||||
}],
|
||||
"description": [
|
||||
{
|
||||
"language_code":"en_us",
|
||||
"string" : "Arguments used to run the Nmap scan. Be careful to specify <a href=\"https://linux.die.net/man/1/nmap\" target=\"_blank\">the arguments</a> correctly. For example <code>-p -10000</code> scans ports from 1 to 10000."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Argumentos utilizados para ejecutar el análisis de Nmap. Tenga cuidado de especificar <a href=\"https://linux.die.net/man/1/nmap\" target=\"_blank\">los argumentos</a> correctamente. Por ejemplo, <code>-p -10000</code> escanea los puertos del 1 al 10000."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": "text",
|
||||
"default_value":"0 2 * * *",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Schedule"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Schedule"
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#NMAP_RUN\"><code>NMAP_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Solo está habilitado si selecciona <code>programar</code> en la configuración de <a href=\"#NMAP_RUN\"><code>NMAP_RUN</code></a>. Asegúrese de ingresar el cronograma en el formato tipo cron correcto."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 30,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo límite de ejecución"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Max run time per device in seconds."
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Tiempo máximo de ejecución por dispositivo en segundos."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "WATCH",
|
||||
"type": "text.multiselect",
|
||||
"default_value":["Watched_Value1"],
|
||||
"options": ["Watched_Value1","Watched_Value2","Watched_Value3","Watched_Value4"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Watched"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Visto"
|
||||
}] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is service type (e.g.: http, ssh)</li><li><code>Watched_Value2</code> is Status (open or closed)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es el tipo de servicio (p. ej., http, ssh)</li><li><code>Watched_Value2</code> es el estado (abierto o cerrado)</li> <li><code>Watched_Value3</code> no utilizado </li><li><code>Watched_Value4</code> no utilizado </li></ul>"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"function": "REPORT_ON",
|
||||
"type": "text.multiselect",
|
||||
"default_value":["new","watched-changed"],
|
||||
"options": ["new","watched-changed","watched-not-changed"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Report on"
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Informar sobre"
|
||||
}] ,
|
||||
"description":[{
|
||||
"language_code":"en_us",
|
||||
"string" : "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
||||
},
|
||||
{
|
||||
"language_code":"es_es",
|
||||
"string" : "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que seleccionó <code>Watched_ValueN Las columnas </code> cambiaron."
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
177
front/plugins/nmap_scan/script.py
Executable file
177
front/plugins/nmap_scan/script.py
Executable file
@@ -0,0 +1,177 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import argparse
|
||||
import sys
|
||||
import re
|
||||
import base64
|
||||
import subprocess
|
||||
from time import strftime
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, decodeBase64
|
||||
from logger import mylog, append_line_to_file
|
||||
from helper import timeNowTZ
|
||||
from const import logPath, pialertPath
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
LOG_FILE = os.path.join(CUR_PATH, 'script.log')
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def main():
|
||||
# sample
|
||||
# /home/pi/pialert/front/plugins/nmap_scan/script.py ips=192.168.1.66,192.168.1.9'
|
||||
parser = argparse.ArgumentParser(description='Scan ports of devices specified by IP addresses')
|
||||
parser.add_argument('ips', nargs='+', help="list of IPs to scan")
|
||||
parser.add_argument('macs', nargs='+', help="list of MACs related to the supplied IPs in the same order")
|
||||
parser.add_argument('timeout', nargs='+', help="timeout")
|
||||
parser.add_argument('args', nargs='+', help="args")
|
||||
values = parser.parse_args()
|
||||
|
||||
# Plugin_Objects is a class that reads data from the RESULT_FILE
|
||||
# and returns a list of results.
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
# Print a message to indicate that the script is starting.
|
||||
mylog('debug', ['[NMAP Scan] In script '])
|
||||
|
||||
# Printing the params list to check its content.
|
||||
mylog('debug', ['[NMAP Scan] values.ips: ', values.ips])
|
||||
mylog('debug', ['[NMAP Scan] values.macs: ', values.macs])
|
||||
mylog('debug', ['[NMAP Scan] values.timeout: ', values.timeout])
|
||||
mylog('debug', ['[NMAP Scan] values.args: ', values.args])
|
||||
|
||||
argsDecoded = decodeBase64(values.args[0].split('=b')[1])
|
||||
|
||||
mylog('debug', ['[NMAP Scan] argsDecoded: ', argsDecoded])
|
||||
|
||||
entries = performNmapScan(values.ips[0].split('=')[1].split(','), values.macs[0].split('=')[1].split(',') , values.timeout[0].split('=')[1], argsDecoded)
|
||||
|
||||
mylog('verbose', ['[NMAP Scan] Total number of ports found by NMAP: ', len(entries)])
|
||||
|
||||
for entry in entries:
|
||||
|
||||
plugin_objects.add_object(
|
||||
primaryId = entry.mac, # MAC (Device Name)
|
||||
secondaryId = entry.port, # IP Address (always 0.0.0.0)
|
||||
watched1 = entry.state, # Device Name
|
||||
watched2 = entry.service,
|
||||
watched3 = entry.ip + ":" + entry.port,
|
||||
watched4 = "",
|
||||
extra = entry.extra,
|
||||
foreignKey = entry.mac
|
||||
)
|
||||
|
||||
# generate last_result.log file
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
class nmap_entry:
|
||||
def __init__(self, ip, mac, time, port, state, service, name = '', extra = '', index = 0):
|
||||
self.ip = ip
|
||||
self.mac = mac
|
||||
self.time = time
|
||||
self.port = port
|
||||
self.state = state
|
||||
self.service = service
|
||||
self.extra = extra
|
||||
self.index = index
|
||||
self.hash = str(mac) + str(port)+ str(state)+ str(service)
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def performNmapScan(deviceIPs, deviceMACs, timeoutSec, args):
|
||||
"""
|
||||
run nmap scan on a list of devices
|
||||
discovers open ports and keeps track existing and new open ports
|
||||
"""
|
||||
|
||||
# collect ports / new Nmap Entries
|
||||
newEntriesTmp = []
|
||||
|
||||
|
||||
if len(deviceIPs) > 0:
|
||||
|
||||
devTotal = len(deviceIPs)
|
||||
|
||||
|
||||
mylog('verbose', ['[NMAP Scan] Scan: Nmap for max ', str(timeoutSec), 's ('+ str(round(int(timeoutSec) / 60, 1)) +'min) per device'])
|
||||
mylog('verbose', ["[NMAP Scan] Estimated max delay: ", (devTotal * int(timeoutSec)), 's ', '(', round((devTotal * int(timeoutSec))/60,1) , 'min)' ])
|
||||
|
||||
|
||||
devIndex = 0
|
||||
for ip in deviceIPs:
|
||||
# Execute command
|
||||
output = ""
|
||||
# prepare arguments from user supplied ones
|
||||
nmapArgs = ['nmap'] + args.split() + [ip]
|
||||
|
||||
progress = ' (' + str(devIndex+1) + '/' + str(devTotal) + ')'
|
||||
|
||||
try:
|
||||
# try runnning a subprocess with a forced (timeout) in case the subprocess hangs
|
||||
output = subprocess.check_output (nmapArgs, universal_newlines=True, stderr=subprocess.STDOUT, timeout=(float(timeoutSec)))
|
||||
except subprocess.CalledProcessError as e:
|
||||
# An error occured, handle it
|
||||
mylog('none', ["[NMAP Scan] " ,e.output])
|
||||
mylog('none', ["[NMAP Scan] Error - Nmap Scan - check logs", progress])
|
||||
except subprocess.TimeoutExpired as timeErr:
|
||||
mylog('verbose', ['[NMAP Scan] Nmap TIMEOUT - the process forcefully terminated as timeout reached for ', ip, progress])
|
||||
|
||||
if output == "": # check if the subprocess failed
|
||||
mylog('minimal', ['[NMAP Scan] Nmap FAIL for ', ip, progress ,' check logs for details'])
|
||||
else:
|
||||
mylog('verbose', ['[NMAP Scan] Nmap SUCCESS for ', ip, progress])
|
||||
|
||||
|
||||
|
||||
# check the last run output
|
||||
newLines = output.split('\n')
|
||||
|
||||
# regular logging
|
||||
for line in newLines:
|
||||
append_line_to_file (logPath + '/pialert_nmap.log', line +'\n')
|
||||
|
||||
|
||||
index = 0
|
||||
startCollecting = False
|
||||
duration = ""
|
||||
newPortsPerDevice = 0
|
||||
for line in newLines:
|
||||
if 'Starting Nmap' in line:
|
||||
if len(newLines) > index+1 and 'Note: Host seems down' in newLines[index+1]:
|
||||
break # this entry is empty
|
||||
elif 'PORT' in line and 'STATE' in line and 'SERVICE' in line:
|
||||
startCollecting = True
|
||||
elif 'PORT' in line and 'STATE' in line and 'SERVICE' in line:
|
||||
startCollecting = False # end reached
|
||||
elif startCollecting and len(line.split()) == 3:
|
||||
newEntriesTmp.append(nmap_entry(ip, deviceMACs[devIndex], timeNowTZ(), line.split()[0], line.split()[1], line.split()[2]))
|
||||
newPortsPerDevice += 1
|
||||
elif 'Nmap done' in line:
|
||||
duration = line.split('scanned in ')[1]
|
||||
|
||||
mylog('verbose', [f'[NMAP Scan] {newPortsPerDevice} ports found on {deviceMACs[devIndex]}'])
|
||||
|
||||
index += 1
|
||||
devIndex += 1
|
||||
|
||||
|
||||
|
||||
#end for loop
|
||||
|
||||
return newEntriesTmp
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user