script to make a dashboard for our Engine

Clovertech Forums Cloverleaf script to make a dashboard for our Engine

  • Creator
    Topic
  • #119577
    Mahmoud Ihaddadene
    Participant

      Good day,

      We are runing Cloverleaf 6.1.3 under Aix 7.2 and we are trying to make a dashboard for our Cloverleaf engine using a script that will show status for all the connections (opening, up, down) and also accumulation for every thread without affecting the engine.

      Any suggestion will be very welcome

      Best Regards

      Mahmoud

    Viewing 4 reply threads
    • Author
      Replies
      • #119578
        Peter Heggie
        Participant

          Will the script be run on the command line and the dashboard is the output of the script, on the monitor display?

          Will the script be a combination of shell scripting and TCL, or just shell scripting?

          Will the output be copied to a database table?

          Peter Heggie

        • #119579
          Mahmoud Ihaddadene
          Participant

            Hi Peter,

            The script TCL for example and shell scripting can be run on a cron job and save it on a MYSQL database and after somebody can query the table and have all the information on the Grafana Dashboard….

            I know that Cloverleaf has an API, how can we use it ???

            Thank you

             

             

          • #119581
            Peter Heggie
            Participant

              We have not used the API yet. We rely on the existing command-line commands and trap the output, and then insert the data into a SQL Server table. However this is a generic statement – we do run commands, trap the output and insert the data to a table, but the commands are not for thread statistics, they are for something else.

              If you have web service experience, I recommend you pursue the newer API (CLAPI), perhaps in a Java language, and include the JDBC logic in that program also.

              But if not, you can trap output from command line commands. We use parent shell scripts that call TCL scripts. The TCL invokes DBLOOKUP, for tables defined in Cloverleaf. The parent script has to execute the setsite command first.

              Peter Heggie

            • #119646
              James Cobane
              Participant

                We have a script that we run every 5 minutes via a cron job that outputs stats to a .html file that is then ftp’d to a webserver where we have a main page that has links to each site’s .html file to display the information.  If a thread as a queue depth, the particular line is highlighted in red.   In the cron script, we simply setsite to each site, then run the command with the -w parameter to output the web page file (sitename.html).  Attached is the script; simply remove the .tcl extension.  Modify as you see fit for your use.

                Here is the set of commands we run in the script for each site:

                setroot
                setsite hfhs4prod
                hfhconnstatus -w > hfhs4prod.html

                 

                The output it produces (which as the html encoding in the .html file to display) is shown in the MS Word attachment

                • This reply was modified 2 years, 8 months ago by James Cobane.
                • This reply was modified 2 years, 8 months ago by James Cobane.
                Attachments:
                You must be logged in to view attached files.
              • #119652
                James Cobane
                Participant

                  Updated Screen shot of web page

                  Attachments:
                  You must be logged in to view attached files.
              Viewing 4 reply threads
              • You must be logged in to reply to this topic.