@Nikhil Pawaria Code here is not entirely correct.

Try this

ClassMethod MonitorFreeSpace(threshold As %Integer = 10) As %Status
{
    Try {
        zn "%SYS"
        Set dbList = ##class(%SQL.Statement).%New()
        Set sc = dbList.%PrepareClassQuery("SYS.Database", "FreeSpace")
        If 'sc Quit

        Set resultSet = dbList.%Execute()

        // Loop through each database entry and check free space
        While resultSet.%Next() {
            Set namespace = resultSet.%Get("DatabaseName")
            Set freeSpacePercent = resultSet.%Get("Free")
            // Alert if free space is below threshold
            If freeSpacePercent < threshold {
                Write "Alert: Namespace "_namespace_" is below the free space threshold with "_freeSpacePercent_"% remaining!", !
            }
        }

        Return 1
    } Catch ex {
        Write "Error: ", ex.DisplayString(), !
        Return 0
    }

    Return 0
}

And link to the related article is correct you can use it
 

Thanks for the reply.

CASCADE means that the data is deleted also in parent and child tables, RESTRICT means that only parent data is deleted. Changing the default RESTRICT does nothing, the data is still there

Any other option?

UPD: i've managed to delete data with

UPDATE TABLE table SET column = NULL

But issue is still open, why %DELDATA do nothing

Hi! 

Thanks for your answer. I've read the docs through out couple times to find the explanation but did not find any. I'll try to express my self more crystal

Suppose i have some myUI app in my IRIS instance. This myUI using DeepSee REST API to get the data. I need to get track of any activity on that UI at any time (in general when a user requests the data)

What should i need as the audit source? 

myUI? Some endpoint from API? Some class executing by this endpoint?

Documentation says:
"Event Source*

The component of the InterSystems IRIS instance that is the source of the event. For InterSystems IRIS events, this is “%System” or “%Ensemble”. For user-defined events, the name can be any string that includes alphanumeric characters or punctuation, except for colons and commas; it can begin with any of these characters except for the percent sign. This can be up to 64 bytes."

Ok, what string? How any random string can be serve as audit source? Same for the audit type 

I get that the string represents my app or part of it, but how that will track actions from myUI?