[APP][PRO] Audit

Thanks.
Level notice shows plugs on/off state changes so I expect doors open/close states to be reported too.
Info is quite talkative :wink: there I kind of miss a filter to exclude some devices (like weather).
An overview page on the existing local audit files would be nice too. Guess that is surely already on the agenda for coming versions.
Will have a closer look the next few days.

1 Like

Thanks @Sharkys, as I am just a normal Homey user and not a very well IT experienced person and have never used Better Stack, I was not aware of the necessary steps.

Wow, what an amount of dataā€¦ :hushed:

Such information are definitely missing in the Homey as a build-in functionā€¦ :+1:t2:

2 Likes

App filled all storage, how to reclaim storage?

06be3778-7a3a-46c8-a5cd-9b4e917367b7.

I rather not have to reinstall the app. Thanks.

If there is a risk that this app can take all storage on Homey Pro it should be possible to set a storage limit and in addition any logs or data should be first in first out so logs overturn rather than fill up the device. Thanks.

1 Like

You will have ask Athom, they donā€™t give us the ability to do much at all when it comes to the storage, I cant even tell you what files are there.

I can add the ability to rotate through log files once they hit a set size, I can also give you the ability to choose how long to retain file for, I woul suggest turning off the detailed view and set an appropriate logging level.

1 Like

Thanks. Even after turning off ā€œLog messagesā€ and ā€œLog detailsā€ the storage is still stuck at 1.1GB. So any think you can do to ensure that Audit cleans up any storage it doesnā€™t need is most welcome.
Screenshot 2024-06-30 125047

I really enjoy the Audit app, it brings insights in some many details and I find it a good way to debug and see what is going on :slight_smile:

Ill write something which deletes the logs, with our requiring he app to be reinstalled.

3 Likes

Hi Jamie,

FYI
Iā€™ve send a report, logging seems to stop after one or several hours, also app crashed today.
ā€“ Pro 2019 ā€“
a92e3f0e-b7a5-4119-9b5a-cda9229d5900

It doesnā€™t seem storage related:

Thanks!

Hi @Jamie

looks like that I have the same problem with HP23 then Peter

Here the loggings from the todayā€™s message file (filed at 09:30):

*|[2024-07-01 5:35:03.825] alert: |BAD Heizkƶrper Target temperature increased from 16.5Ā°C to 17Ā°C|*
*|---|---|*
*|[2024-07-01 5:35:03.847] crit: |Log file /userdata/message-2024-07-01.log created|*
*|[2024-07-01 5:35:03.849] crit: |Log file rotating from /userdata/message-2024-06-30.log to /userdata/message-2024-07-01.log|*
*|[2024-07-01 5:35:03.849] crit: |Log file /userdata/detail-2024-06-27.log.gzremoved|*
*|[2024-07-01 5:35:03.850] crit: |Log file /userdata/detail-2024-06-28.log.gzremoved|*
*|[2024-07-01 5:35:03.851] crit: |Log file /userdata/detail-2024-07-01.log created|*
*|[2024-07-01 5:35:03.852] crit: |Log file rotating from /userdata/detail-2024-06-30.log to /userdata/detail-2024-07-01.log|*
*|[2024-07-01 5:35:03.878] crit: |Log file archived to /userdata/detail-2024-06-30.log.gz|*
*|[2024-07-01 5:35:04.392] crit: |Log file archived to /userdata/message-2024-06-30.log.gz|*

Iā€™ve send a report: b393baba-b4aa-4485-aa0c-1a80766cd8b7

I thought there is something wrong with the way the logs rotate and self manage, I am worried that if the app crashes ā€¦ then old log files are also no longer rotated.

But from your log it all looks to be working :

Creates a new logfile for the day (07-01) then it rotates the old (06-30) then zips it up. The detail files from 27 and 28th are being deleted (as they should)

Its really hard to test and manage this log management,In the mean time, i would suggest disable the file logging and rely upon betterstack - and next time I get a chance Ill create a flow to delete all files.

2 Likes

This or maybe onInit ā€œsafetyā€ mechanism, eg. to delete all xx previous files in case of total log size is higher then ā€¦ I donā€™t know, 50MB - 100MB (configurable via settings? :wink: ) ? Just a suggestion.

Yeah it needs something, I wish there was a manager which Athom supplied us with to manage some of this, writing my own file manager doesnt fill me with excitement.

But I dont think there is much for it, I appreciate all the testing the community is doing on the fileLogger so that we can get to a stable approach. Keep sending in logs when it fails

Thanks Everyone

3 Likes

In the latest test version, there is a section at the bottom of the settings page which lists all the files used by the app, (which you can click) along with the option to ā€˜delete allā€™. There was also tweaks to the log levels and meter_power will now display as debug rather than info.

This is a quick fix, and not what the end result will be like but I wanted to give you the ability ti solve this as soon as possible.

8 Likes

It now shows the file size and you can choose to delete detail or messages rather then forced to ā€˜delete allā€™, clicking on the file will open it in a new tab - which can be closed to return back to the settings.

2 Likes

Guys, I just canā€™t find it :man_shrugging: :face_with_peeking_eye:
I want to login to betterstack with a password, not with magic link and also not with SSO.
Where can I set my passwordā€¦ Anyone?

I think I simply registered, created resource, copied tokenā€¦

Feature request: move running timer/stopwatch values to debug category
Timer starts and stops are fine to occur in the info category of course.

Example, 4 lines of timer value lines within a second

Can you expand out the stop watch for me and paste the json, in the Thread? Should be able to update it to be debug immediately with that info,

Just as a heads up this app took so long to get approved, I actually started a full rewrite of it about a month ago, the rewrite will open the doors for users to have more control over the levels of items. I donā€™t know when/if ill finish that off though, so please feel free to post to this Thread any requests for alterations - especially apps/other which are overly noisy.

Also as a general heads up, Im going to be updating the ā€˜defaultā€™ level from ā€˜infoā€™ to ā€˜noticeā€™, this is to allow more fine control over what items people can filter by. There are 8 levels, but the top 4 are never used, I want to spreed things out.

For capabilities this will look like :

Level Description Example
Debug Debug, Statistical, Metering and Trace Any metering of data, information about last updated or last seen, duration, any running tally (such as daily, weekly or monthly)
Info Information on Measurements temperature, humidity, ultraviolet, pressure, water, pm2.5, co, co2, battery, power, voltage, current, etc
Notice Notice of user actions on/off, dim, light hue, light temperature, light mode, window-covering state, window-covering position, volume, speaker volume, vacuum cleaner state, etc.
Warning Warning of observations contact alarm, motion alarm, presence alarm, battery alarm, generic alarm
Error
Critical Critical changes to the system locked, lock mode, garage, home alarm state, thermostat mode
Alert
Emergency Emergency smoke alarm, fire alarm, water alarm, heat alarm, co alarm, co2 alarm, pm25 alarm, tamper alarm.
5 Likes

After the update to Audit 1.0.12 on Homey Pro 2023 with 11.1.2 I got following messages

[2024-07-04 1:18:50.599] alert: Audit Log has been initialized
[2024-07-04 8:28:00.591] warning: H_Arb.Zi. 2 Ziel-Temperatur increased from 17Ā°C to 28Ā°C
[2024-07-04 8:28:00.640] warning: H_Arb.Zi. 2 Ziel-Temperatur decreased from 28Ā°C to 17Ā°C

Message level is notice.
Last time temp. changes hat level info.
At 1:19 UTC there was a homey restart after a FW update. Did expect to find alerts on apps being started. Audit did ā€žinformā€œ syslog about thar.
The intended info with level notice sounds good to me.
Oh, as mentioned earlier I prefer local time in the log.

Here you go

{
    "context": {
        "runtime": {
            "column": 28,
            "file": "../../../../../../lib/watcher/capability.js",
            "function": "trigger",
            "line": 57,
            "method": "trigger",
            "type": "Capability"
        },
        "system": {
            "main_file": "/opt/homey-client/system/manager/ManagerApps/AppProcess/bootstrap.js",
            "pid": 10328
        }
    },
    "detail": {
        "code": "duration",
        "device": "Timer EettafelTuya",
        "driver": "homey:app:nl.fellownet.chronograph:timer",
        "owner": "",
        "type": "duration",
        "value": "0.41seconds",
        "zone": "[1.2] Eethoek"
    },
    "dt": "2024-07-04T11:34:06.746Z",
    "level": "info",
    "message": "Timer EettafelTuya Duration decreased from 0.66seconds to 0.41seconds",
    "meta": {
        "action": "update",
        "entity": "capability",
        "fields": [
            "duration"
        ],
        "id": "02f3604f-cb7d-43ea-8bbf-23f67ba489ba",
        "name": "Duration",
        "reason": "duration",
        "timestamp": 1720092846737
    }
}

Oh, btw, the Bstack log level is set to the default level, ā€˜infoā€™.

Evening,

A new app has been released to test

  1. Device Capabilities now follow the rules below.
  2. Duration is now a debug level
  3. Changes to the properties of ā€œgroupā€ app items are now at debug level.
  4. Logs are now in local timezones! Note, logs will remain in sequence but times are going to jump as a once off.
Level Description Example
Debug Debug, Statistical, Metering and Trace Any metering of data, information about last updated or last seen, duration, any running tally (such as daily, weekly or monthly)
Info Information on Measurements temperature, humidity, ultraviolet, pressure, water, pm2.5, co, co2, battery, power, voltage, current, etc
Notice Notice of user actions on/off, dim, light hue, light temperature, light mode, window-covering state, window-covering position, volume, speaker volume, vacuum cleaner state, etc.
Warning Warning of observations contact alarm, motion alarm, presence alarm, battery alarm, generic alarm
Error
Critical Critical changes to the system locked, lock mode, garage, home alarm state, thermostat mode
Alert
Emergency Emergency smoke alarm, fire alarm, water alarm, heat alarm, co alarm, co2 alarm, pm25 alarm, tamper alarm.

I still havenā€™t experienced the logs stopping like some people have reported - sorry Ill keep trying, please keep letting me know if its occurring.

If you have any other suggestions, please let me know.

3 Likes