Kaseya Community

Custom fields should be null for all agents !!

This question is not answered

Hi,

Here i am explaining the briefly about the issue what i am facing...

i have created a custom field, where it was showing the windows services running or not and i have scheduled the same once per day(morning time).

Here i am facing problem with offline clients,(Where the status was remaining the same).

Now i am looking for a solution like all the agents custom field should be null (evening time including offline agent custom fields)

Thanks in advance...

Regards,

Sumanth

All Replies
  • You can do this with the APIs - they don't care if the agent is online or offline.

    Glenn

  • Thanks gbarnas ,

    Can you please explain briefly....(if possible with example screenshot!!!)

  • There's no easy way to update custom fields for 'offline' agents within the VSA interface - as Glenn points out you can use the API.

    Ultimately it sounds like the problem is potentially stale data so if you don't want to get into the API side of things you can work around the problem using the agent procedure 'history'.

    I suggest writing an agent procedure that checks the service(s) status - if the service(s) aren't running have it run a second procedure called something like 'Services not running'. That second procedure doesn't need to do anything, it's just a 'marker' in the agent procedure history.

    You can then create a view based on whether that second procedure ('Services not running') ran in the last X minutes/hours/days - it will only have run if your service(s) were *actually* detected as stopped in that period.

  • Hello Sumanth,

    You could create a procedure with the following SqlWrite step with the below command and schedule it 10 minute before you run the other procedure.

    Update

    [ksubscribers].[dbo].[auditRsltManualFieldValues]

    Set FieldValue = NULL

    where [FieldNameFK] in

    (

    SELECT [id]

    FROM [ksubscribers].[dbo].[auditRsltManualFields] where FieldName = '<yourfieldname>'

    )

    Change <yourfieldname> with the field value you want to set to NULL.

    This will change ALL of the Custom Fields to NULL before processing the rest of the procedure.

    You can also do the same by adding a SQL Server Job with the above script (it will run independently from Kaseya).

    Best Regards

    Alex