Executed Snapin Status information in Webinterface
-
Hello and thanks for this great project first!
I run Fog in version 1.4.4 and basically all works productive. I usualy use it to run application tests on real hardware and recover / start tests for software.
Currently my main question is how to get the current state of a host to the webinterface or requestable by api.
When I start a task of execute a snapin it is started like expected but I would like to get status information from current step back instead of blind testing.
I like the progress information when I deploy an image and would love to have that also for python scripts, batches or other applications.
Any documentation I missed?
Thanks in advance.
Fog Host is a Debian 9 Server and the usual hosts are Win10 based…TIA!
-
@freak You can do this - but you have to do it yourself. The way I got output from my scripts via snapins is - I made a SMB share on my FOG Server - and linked that share to /var/www/html/output or something like that - that way the output logs are web accessible. Then in my scripts I’d just write my logs to the share.
Here’s a little tutorial I wrote on how to create a SMB share on your FOG Server: https://wiki.fogproject.org/wiki/index.php?title=Password_Protected_Samba_Share
-
@freak I might call on lee rowlett to help. He does something similar using the task state plugin. While not perfect in terms of display percentage, as the snapins run the call different things changing the state to be a bit more customized for your needs.
-
@LEE-ROWLETT here he is I think.
-
Thanks for the answers!
It might be a workaround to have a smb share on the debian system, but how does the progress bar in the tasklist actually work for the current status?
I would prefer a non smb way due to this might influence the tests I would like to run.
Something like RabbitMq / AMQP might be interesting also… -
so like tom pointed out not perfect for percentage or showing a progress bar however dependant on what you’re doing you can get it to display at what stage your snapin is at…
i have one snapin install several software packages dependant on several variations however with the task state, the engineers know at what it is at… this can be easily achieved with http calls within ur script, you will just need to obtain mac and taskid and then send stateid and hook to display custom states.
not quite sure if this is what you’re looking for?
-
@lee-rowlett said in Executed Snapin Status information in Webinterface:
i have one snapin install several software packages dependant on several variations however with the task state, the engineers know at what it is at… this can be easily achieved with http calls within ur script, you will just need to obtain mac and taskid and then send stateid and hook to display custom states.
Exactly!
Do you have a example http call? -
@freak
checkin and obtain taskidhttp://FOGSERVER/fog/service/snapins.checkin.php?mac=MACADDRESS
then to update status:
http://FOGSERVER/fog/service/snapins.file.php?mac=MACADDRESS&taskid=TASKID&stateid=STATEID