Project

General

Profile

Feature #26278

Add ability to get console messages to API

Added by Daisuke Imai 12 months ago. Updated 12 months ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Estimated time:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

We need to get an API to get console messages.
Please take old site as reference.

For example,

<ip address>/system/varlogmessages/
This API will just return 3 error messages.

<ip address>/system/varlogmessages/500
This API will returen 500 error messages.


Related issues

Related to FreeNAS - Feature #23137: Make System Advanced feature completeResolved2017-04-06

Associated revisions

Revision c6c55ded (diff)
Added by William Grzybowski 12 months ago

feat(middlewared/client): add subscribe option

For now this will hang indefinitely until ctrl-c.

Ticket: #26278

Revision e57019e3 (diff)
Added by William Grzybowski 12 months ago

feat(middlewared): first pass at event source feature

Ticket: #26278

Revision 1f0a8569 (diff)
Added by William Grzybowski 12 months ago

fix(middlewared): sending event from EventSource

Ticket: #26278

Revision 74f8a4a1 (diff)
Added by William Grzybowski 12 months ago

feat(middlewared): move EventSource to its own module

Ticket: #26278

Revision 49894b3c (diff)
Added by William Grzybowski 12 months ago

feat(middlewared/filesystem): implement filesystem.get_and_watch event

Ticket: #26278

Revision 722214af (diff)
Added by William Grzybowski 12 months ago

fix(middlewared): unsubscribe event source

Ticket: #26278

Revision 407649a8 (diff)
Added by William Grzybowski 12 months ago

fix(middlewared): make `unsubscribe` async

Ticket: #26278

Revision b0cc6e4f (diff)
Added by William Grzybowski 12 months ago

fix(middlewared): unsubscribe when event source finishes

Ticket: #26278

Revision a1735918 (diff)
Added by William Grzybowski 12 months ago

fix(middlewared): use Event and rename event source class name

Ticket: #26278

Revision f241423c (diff)
Added by William Grzybowski 12 months ago

fix(middlewared): replace for statements with a smaller construct

Ticket: #26278

Revision 1aa39576 (diff)
Added by William Grzybowski 12 months ago

fix(middlewared/filesystem): rename event name as well, not just class

Ticket: #26278

Revision fc74e153 (diff)
Added by William Grzybowski 12 months ago

feat(middlewared): add `start_daemon_thread` helper

Ticket: #26278

Revision 1270f450
Added by William Grzybowski 12 months ago

Merge pull request #368 from freenas/issues/26278

Implement event source feature with file get and watch source

Ticket: #26278

History

#1 Updated by William Grzybowski 12 months ago

  • Status changed from Unscreened to Screened
  • Priority changed from No priority to Nice to have

#2 Updated by William Grzybowski 12 months ago

#3 Updated by William Grzybowski 12 months ago

  • Status changed from Screened to Needs Developer Review
  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

#4 Updated by Vladimir Vinogradenko 12 months ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

#5 Updated by William Grzybowski 12 months ago

  • Status changed from Reviewed by Developer to Ready For Release

Daisuke, event subscription for file has been implemented, use 'filesystem.file_tail_follow' subscription:

root@freenas:~ # midclt subscribe filesystem.file_tail_follow:/var/log/messages ADDED {'msg': 'added', 'collection': 'filesystem.file_tail_follow:/var/log/messages', 'fields': {'data': "Oct 24 16:59:15 freenas /middlewared: [aiohttp.websocket:430] websocket connection is closing.\nOct 24 19:54:28 freenas devd: notify_clients: send() failed; dropping unresponsive client\nOct 24 19:56:11 freenas /alert.py: [system.alert:370] Alert module '<samba4.Samba4Alert object at 0x81749a9e8>' failed: [Errno 61] Connection refused\n"}}

root@freenas:~ # midclt subscribe filesystem.file_tail_follow:/var/log/messages:10
ADDED {'msg': 'added', 'collection': 'filesystem.file_tail_follow:/var/log/messages:10', 'fields': {'data': "Oct 24 16:40:36 freenas /alert.py: [system.alert:370] Alert module '<update_check.UpdateCheckAlert object at 0x815fd3a58>' failed: [Errno 61] Connection refused\nOct 24 16:41:36 freenas /alert.py: [system.alert:370] Alert module '<samba4.Samba4Alert object at 0x81749a9e8>' failed: [Errno 61] Connection refused\nOct 24 16:41:36 freenas /alert.py: [system.alert:370] Alert module '<update_check.UpdateCheckAlert object at 0x815fd3a58>' failed: [Errno 61] Connection refused\nOct 24 16:42:36 freenas /alert.py: [system.alert:370] Alert module '<samba4.Samba4Alert object at 0x81749a9e8>' failed: [Errno 61] Connection refused\nOct 24 16:42:36 freenas /alert.py: [system.alert:370] Alert module '<update_check.UpdateCheckAlert object at 0x815fd3a58>' failed: [Errno 61] Connection refused\nOct 24 16:43:36 freenas /alert.py: [system.alert:370] Alert module '<samba4.Samba4Alert object at 0x81749a9e8>' failed: [Errno 61] Connection refused\nOct 24 16:43:36 freenas /alert.py: [system.alert:370] Alert module '<update_check.UpdateCheckAlert object at 0x815fd3a58>' failed: [Errno 61] Connection refused\nOct 24 16:59:15 freenas /middlewared: [aiohttp.websocket:430] websocket connection is closing.\nOct 24 19:54:28 freenas devd: notify_clients: send() failed; dropping unresponsive client\nOct 24 19:56:11 freenas /alert.py: [system.alert:370] Alert module '<samba4.Samba4Alert object at 0x81749a9e8>' failed: [Errno 61] Connection refused\n"}}

#6 Updated by Dru Lavigne 12 months ago

  • Subject changed from Getting Console messages to Add ability to get console messages to API

#7 Updated by Dru Lavigne 12 months ago

  • Target version changed from 11.1 to 11.1-RC1

#8 Updated by Daisuke Imai 12 months ago

  • Blocks deleted (Feature #23137: Make System Advanced feature complete)

#9 Updated by Daisuke Imai 12 months ago

  • Related to Feature #23137: Make System Advanced feature complete added

#10 Updated by Dru Lavigne 12 months ago

  • Status changed from Ready For Release to Resolved

#11 Updated by Joe Maloney 12 months ago

  • Needs QA changed from Yes to No
  • QA Status deleted (Not Tested)

Also available in: Atom PDF