Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
20-21
18
chirpstack-monitoring
Commits
bcc77d22
Commit
bcc77d22
authored
Mar 15, 2021
by
Kevin Yung
Browse files
correction d'erreur sur les changements de states des gateways
parent
33dfbece
Changes
4
Show whitespace changes
Inline
Side-by-side
reports/.mails.csv
0 → 100644
View file @
bcc77d22
reports/ChirpstackMonitoring.token.json
View file @
bcc77d22
{
"jwt"
:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNTM4NzM2NCwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTUzMDA5NjQsInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.H5mO2AL35i-0BK4YBTZTZ_5MHDKqq-7c7HPqexnKQOU"
}
\ No newline at end of file
{
"jwt"
:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNTkxMDIxMiwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTU4MjM4MTIsInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.WMcgbg-Mi4QecWM-MkZ4WImwycGyHuH2Rvqj1tXsGPo"
}
\ No newline at end of file
reports/get_id_gatewaysChange.sh
View file @
bcc77d22
...
...
@@ -81,9 +81,11 @@ do
then
if
[[
"
${
state
[
$i
]
}
"
==
"active"
]]
then
replacement
=
"<li style="
color:green
"><a href='https://lns.campusiot.imag.fr/#/organizations/6/gateways/7276ff0039030716'>7276ff0039030716</a>: KER_FEMTO_030716_P307 - (org 6) - 2021-03-07T19:14:43.804084Z</li>"
tmp
=
$(
grep
${
id
[
$i
]
}
< .gateways.html
)
replacement
=
${
tmp
/
"<li>"
/
"<li style="
color
:green
">"
}
else
replacement
=
"<li style="
color:red
"><a href='https://lns.campusiot.imag.fr/#/organizations/6/gateways/7276ff0039030716'>7276ff0039030716</a>: KER_FEMTO_030716_P307 - (org 6) - 2021-03-07T19:14:43.804084Z</li>"
tmp
=
$(
grep
${
id
[
$i
]
}
< .gateways.html
)
replacement
=
${
tmp
/
"<li>"
/
"<li style="
color
:red
">"
}
fi
sed
-i
"/
${
id
[
$i
]
}
/c
$replacement
"
.gateways.html
fi
...
...
reports/sendmail_reports.sh
View file @
bcc77d22
...
...
@@ -15,5 +15,5 @@ CONTENT_TYPE="Content-type: text/html"
#mail -a "$CONTENT_TYPE" -s "$SUBJECT" -u monitoring $TO <.gateways.html
#mail -a "$CONTENT_TYPE" -s "$SUBJECT" -u monitoring $TO <.devices.html
#mailx -a "$CONTENT_TYPE" -s "$SUBJECT" <.gateways.html "$TO"
mail
-s
"Test"
kevyung24@gmail.com
\ No newline at end of file
mailx
-a
"
$CONTENT_TYPE
"
-s
"
$SUBJECT
"
<.gateways.html
"
$TO
"
#mail -s "Test" kevyung24@gmail.com
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment