- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-20-2023 02:38 PM
Hello dear community,
I wan't to check the boot time of server OS, because of windows updates. When they got installed and the system is not booted, it will get to an unstable status.
This is a small script, which is reading the fqdn, hostname and reboot time.
02-21-2023 07:56 AM
Hi @RFeyertag,
With a few changes to your code, it would be possible to retrieve this information as you suggested by running the Python script against your target endpoints via the Action Center. Rather than just printing the output, it would be better to return the values in a dictionary.
However, it is probably much easier to leverage XQL to find this information. Try using the following query and adjust as needed:
dataset = xdr_data
| filter event_type = ENUM.AGENT_STATUS and event_sub_type = ENUM.AGENT_STATUS_AGENT_BOOT
| fields agent_host_boot_time as Last_Reboot, agent_hostname
| alter Last_Reboot = to_timestamp(Last_Reboot, "MILLIS")
| dedup Last_Reboot by asc Last_Reboot
| sort asc Last_Reboot
I hope this helps!
Regards,
Tim
02-21-2023 07:56 AM
Hi @RFeyertag,
With a few changes to your code, it would be possible to retrieve this information as you suggested by running the Python script against your target endpoints via the Action Center. Rather than just printing the output, it would be better to return the values in a dictionary.
However, it is probably much easier to leverage XQL to find this information. Try using the following query and adjust as needed:
dataset = xdr_data
| filter event_type = ENUM.AGENT_STATUS and event_sub_type = ENUM.AGENT_STATUS_AGENT_BOOT
| fields agent_host_boot_time as Last_Reboot, agent_hostname
| alter Last_Reboot = to_timestamp(Last_Reboot, "MILLIS")
| dedup Last_Reboot by asc Last_Reboot
| sort asc Last_Reboot
I hope this helps!
Regards,
Tim
02-22-2023 01:29 PM
Hello @timurphy!
This is a great solution!
I will prepare it for my self with the highest restart time and the group name.
Thank you so much!
BR
Rob
02-22-2023 01:30 PM
Hello Tim,
This is a great solution!
I will prepare it for my self with the highest restart time and the group name.
Thank you so much!
BR
Rob
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!