Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[solved] webhooks on 1.5 build 6

#11
Microsoft documentation is a farce. I've written the webhook only to have the query rejected. A bit of digging and find: https://stackoverflow.com/questions/5075...ptive-card

Look at Microsoft's response and the replies beneath it...

So for MS Teams, the webhook will have to be [gasp] plain text.

Recommendation: use Discord.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#12
MS Teams [text only] webhooks are now supported. Run the following command to receive the update:


Code:
sudo nems-update


The webhook subsystem has been upgraded to automatically detect if the webhook belongs to MS Teams, and if yes, it will format the query appropriately. Once they [finally] support rich ActionCards, it will also include colorized icons that reflect the state.

Let me know how that works for you, and if we're good to go, please mark the thread as [solved].

Thanks!
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#13
Damn Robbie, that's a heck of a lot of work!

I ran the update.


Code:
[i]NEMS Update[/i]

[i]Updating NEMS Core Components[/i]
[i] - nems-migrator[/i]
[i]   Commit: 27105e034a2a7f749462fec4bd92edf4d13fee24[/i]
[i]   Already up to date.[/i]
[i]   No changes.[/i]
[i] - nems-www...[/i]
[i]   Commit: ba1847e89c467f4581f6d647e597d07ff6f78b6d[/i]
[i]   Already up to date.[/i]
[i]   No changes.[/i]
[i] - nems-admin...[/i]
[i]   Commit: 37071183f6a2a71b5701404c665b75e92dbefbcc[/i]
[i]   Already up to date.[/i]
[i]   No changes.[/i]
[i] - nconf...[/i]
[i]   Commit: 1dd9fdcd460bfb3f61be9742be3c65a670a804c2[/i]
[i]   Already up to date.[/i]
[i]   No changes.[/i]
[i] - nems-tools...[/i]
[i]   Commit: b739ce28ec2b33239dcc92874af0625d25070a63[/i]
[i]   remote: Enumerating objects: 9, done.[/i]
[i]remote: Counting objects: 100% (9/9), done.[/i]
[i]remote: Compressing objects: 100% (6/6), done.[/i]
[i]remote: Total 9 (delta 4), reused 8 (delta 3), pack-reused 0[/i]
[i]Unpacking objects: 100% (9/9), done.[/i]
[i]From https://github.com/Cat5TV/nems-tools[/i]
[i]   b739ce2..acf69ed  master     -> origin/master[/i]
[i]Updating b739ce2..acf69ed Fast-forward webhook | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 89 insertions(+), 21 deletions(-)[/i]
[i]   New Commit: b739ce28ec2b33239dcc92874af0625d25070a63[/i]
[i] - nems-scripts...[/i]
[i]   Commit: 00fa2039a1bd2ca115dc048be6a21853e6005266[/i]
[i]   Already up to date.[/i]
[i]   No changes.[/i]

[i]Running updates and fixes... Please wait for apt tasks to complete...[/i]
[i]Done.[/i]
[i]Hit:1 http://archive.raspberrypi.org/debian buster InRelease[/i]
[i]Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB][/i]
[i]Ign:3 http://giteduberger.fr rpimonitor/ InRelease[/i]
[i]Hit:4 http://giteduberger.fr rpimonitor/ Release[/i]
[i]Get:5 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.1 MB][/i]
[i]Fetched 13.1 MB in 13s (1,003 kB/s)[/i]
[i]Reading package lists... Done[/i]
[i]Building dependency tree[/i]
[i]Reading state information... Done[/i]
[i]190 packages can be upgraded. Run 'apt list --upgradable' to see them.[/i]
[i]Hit:1 http://archive.raspberrypi.org/debian buster InRelease[/i]
[i]Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease[/i]
[i]Ign:3 http://giteduberger.fr rpimonitor/ InRelease[/i]
[i]Hit:4 http://giteduberger.fr rpimonitor/ Release[/i]
[i]Reading package lists... Done[/i]
[i]Building dependency tree[/i]
[i]Reading state information... Done[/i]
[i]190 packages can be upgraded. Run 'apt list --upgradable' to see them.[/i]
[i]userdel: nemsadmin mail spool (/var/mail/nemsadmin) not found[/i]

[i]Done.[/i]





This is the message I'm getting from Teams for the alerts - doesn't show you the server or what the critical error is.

NEMS NEMS State: CRITICAL.
NEMS State: CRITICAL.
Reporting Server: NEMS
Timestamp: 2019-03-14T09:50:23-04:00
Powered by NEMS Linux 1.5
 Reply
#14
Run nems-update again! Great news: while MS Teams webhooks are currently text only, they DO convert hyphens to bullet points!

So I just updated the webhook for you to include:
- problem state info
- more problem state info

And it works!

Run the update and let me know what you think!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#15
Thanks Robbie!

This is how it looks now.

NEMS Updated:
  • Service "Memory Usage" on YYZ-test01: connect to address x.x.x.204 and port 12489: No route to host

  • Service "C:\ Drive Space" on YYZ-test01: connect to address x.x.x.204 and port 12489: No route to host Other issues:

  • Service "Memory Usage" on YYZ-test02: Memory usage: total:11839.65 MB - used: 9934.74 MB (84%) - free: 1904.91 MB (16%)

  • Service "E:\ Drive Space" on YYZ-test02: e:\ - total: 8126.00 Gb - used: 7407.11 Gb (91%) - free 718.88 Gb (9%)
Reporting Server: NEMS
Timestamp: 2019-03-14T11:24:16-04:00
Powered by NEMS Linux 1.5
 Reply
 
Forum Jump:

Users browsing this thread: 1 Guest(s)