• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Executed Snapin Status information in Webinterface

Scheduled Pinned Locked Moved
General Problems
4
8
1.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    Freak
    last edited by Sep 14, 2017, 3:21 PM

    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!

    W T 2 Replies Last reply Sep 15, 2017, 12:09 AM Reply Quote 0
    • W
      Wayne Workman @Freak
      last edited by Wayne Workman Sep 14, 2017, 6:09 PM Sep 15, 2017, 12:09 AM

      @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

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott @Freak
        last edited by Sep 15, 2017, 12:44 AM

        @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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • T
          Tom Elliott
          last edited by Sep 15, 2017, 12:45 AM

          @LEE-ROWLETT here he is I think.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • F
            Freak
            last edited by Sep 15, 2017, 9:55 AM

            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…

            1 Reply Last reply Reply Quote 0
            • L
              Lee Rowlett Developer
              last edited by Lee Rowlett Sep 20, 2017, 7:17 PM Sep 21, 2017, 1:16 AM

              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?

              1_1505956601544_Example1.jpg 0_1505956601544_Example.jpg

              F 1 Reply Last reply Sep 25, 2017, 12:04 PM Reply Quote 0
              • F
                Freak @Lee Rowlett
                last edited by Sep 25, 2017, 12:04 PM

                @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?

                L 1 Reply Last reply Sep 30, 2017, 11:09 AM Reply Quote 0
                • L
                  Lee Rowlett Developer @Freak
                  last edited by Sep 30, 2017, 11:09 AM

                  @freak
                  checkin and obtain taskid

                  http://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

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    6/8
                    Last post

                  159

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project