Hello,
When I try to open a live response session using the job-based api for a machine offline, even when the machine comes back online, it doesn't execute the job, nor the job timeouts.
Steps to reproduce:
1 - Configure the credentials.reponse as per instruction
2 - Find a machine that is offline on the console, in my case, offline for half an hour, more or less
3 - Run the sample code below
4 - Wait a the timeout period (I've waited for 10 minutes), no timeout error), no exception is raised
5 - Start the machine
6 - The code will show that the machine is offline, but the job still won't start.
Let me know if I can provide more information.
======= Related code =======
import time
from cbapi.response import Process, CbResponseAPI, Sensor
from cbapi.response.models import Sensor as CB_Sensor
class Test():
def run(self, session):
return session.list_directory("c:\")
def main():
hostnames = ["DESKTOP-90N8EBG"]
cb = CbResponseAPI()
sensor = cb.select(Sensor).where("hostname:"+hostnames[0]).first()
a = Test()
job = cb.live_response.submit_job(a.run, sensor.id)
try:
while True:
time.sleep(20)
sensor.refresh()
print(job, sensor.status)
except KeyboardInterrupt:
print("Exiting event loop")
if name == 'main':
main()
Hello,
When I try to open a live response session using the job-based api for a machine offline, even when the machine comes back online, it doesn't execute the job, nor the job timeouts.
Steps to reproduce:
1 - Configure the credentials.reponse as per instruction
2 - Find a machine that is offline on the console, in my case, offline for half an hour, more or less
3 - Run the sample code below
4 - Wait a the timeout period (I've waited for 10 minutes), no timeout error), no exception is raised
5 - Start the machine
6 - The code will show that the machine is offline, but the job still won't start.
Let me know if I can provide more information.
======= Related code =======
import time
from cbapi.response import Process, CbResponseAPI, Sensor
from cbapi.response.models import Sensor as CB_Sensor
class Test():
def run(self, session):
return session.list_directory("c:\")
def main():
hostnames = ["DESKTOP-90N8EBG"]
cb = CbResponseAPI()
if name == 'main':
main()