ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Saltstack Data collection

    IT Discussion
    saltstack
    4
    10
    524
    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.
    • AdamFA
      AdamF
      last edited by

      I'm working on a project where I want to display data collected from Salt Minions. I can easily parse the data once I have it collected in a predictable format. Salt can output to JSON nicely, so that is probably what I will parse from. I am uncertain of the best way to go about the data collection piece though.

      Requirements:

      • Run a few different commands on a few of Salt minions.
      • Output the commands to a JSON file for parsing later.
      • Schedule the commands to run on a schedule

      Let’s say I want to get 3 pieces of information. I want to get disk space usage, free memory, and cpu load. I want to obtain this information every 15 minutes or so. I then want to parse the data later to display somewhere else. The output of the commands should be in JSON format. I want the output of the information to be timestamped. So the JSON file would be names something like: “minionname-DiskUsage-yyyy-MM-dd_hhmmss “

      What is the best way to achieve this? Is this best achieved through a state file? (In other words, run the state on each minion on a schedule and from within the state file, output the results to the files mentioned above? If so, can someone provide an example?

      Or is this better achieved in another way with Salt?

      1 Reply Last reply Reply Quote 0
      • DashrenderD
        Dashrender
        last edited by

        @fuznutz04 said in Saltstack Data collection:

        information every 15 minutes or so. I then want to parse the data later to display somewhere else. The output of the

        Wouldn't Zabbix be better for this?

        AdamFA 1 Reply Last reply Reply Quote 0
        • AdamFA
          AdamF @Dashrender
          last edited by

          @Dashrender said in Saltstack Data collection:

          @fuznutz04 said in Saltstack Data collection:

          information every 15 minutes or so. I then want to parse the data later to display somewhere else. The output of the

          Wouldn't Zabbix be better for this?

          So my thought here is to keep the agents on the servers as minimal as possible. If I am going to use Saltstack for other things as well, is it really necessary to add another zabbix agent as welll?

          DashrenderD 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Can be done, SodiumSuite was doing this.

            DashrenderD 1 Reply Last reply Reply Quote 0
            • DashrenderD
              Dashrender @AdamF
              last edited by

              @fuznutz04 said in Saltstack Data collection:

              @Dashrender said in Saltstack Data collection:

              @fuznutz04 said in Saltstack Data collection:

              information every 15 minutes or so. I then want to parse the data later to display somewhere else. The output of the

              Wouldn't Zabbix be better for this?

              So my thought here is to keep the agents on the servers as minimal as possible. If I am going to use Saltstack for other things as well, is it really necessary to add another zabbix agent as welll?

              I hear ya - but there's also the saying - the right tool for job. I have no clue if using SALT this way is good or not.

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Dashrender
                last edited by

                @Dashrender said in Saltstack Data collection:

                @fuznutz04 said in Saltstack Data collection:

                @Dashrender said in Saltstack Data collection:

                @fuznutz04 said in Saltstack Data collection:

                information every 15 minutes or so. I then want to parse the data later to display somewhere else. The output of the

                Wouldn't Zabbix be better for this?

                So my thought here is to keep the agents on the servers as minimal as possible. If I am going to use Saltstack for other things as well, is it really necessary to add another zabbix agent as welll?

                I hear ya - but there's also the saying - the right tool for job. I have no clue if using SALT this way is good or not.

                For non-real time stats, it is pretty good. If you want constant data, it is not.

                AdamFA 1 Reply Last reply Reply Quote 0
                • DashrenderD
                  Dashrender @scottalanmiller
                  last edited by

                  @scottalanmiller said in Saltstack Data collection:

                  Can be done, SodiumSuite was doing this.

                  Was is exporting data to a JSON file - or just sending the data directly to the SS server?

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • AdamFA
                    AdamF @scottalanmiller
                    last edited by

                    @scottalanmiller said in Saltstack Data collection:

                    @Dashrender said in Saltstack Data collection:

                    @fuznutz04 said in Saltstack Data collection:

                    @Dashrender said in Saltstack Data collection:

                    @fuznutz04 said in Saltstack Data collection:

                    information every 15 minutes or so. I then want to parse the data later to display somewhere else. The output of the

                    Wouldn't Zabbix be better for this?

                    So my thought here is to keep the agents on the servers as minimal as possible. If I am going to use Saltstack for other things as well, is it really necessary to add another zabbix agent as welll?

                    I hear ya - but there's also the saying - the right tool for job. I have no clue if using SALT this way is good or not.

                    For non-real time stats, it is pretty good. If you want constant data, it is not.

                    Yeah, I don't need real time. Would you be willing to share how to do this, or is this secret sauce?

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @Dashrender
                      last edited by

                      @Dashrender said in Saltstack Data collection:

                      @scottalanmiller said in Saltstack Data collection:

                      Can be done, SodiumSuite was doing this.

                      Was is exporting data to a JSON file - or just sending the data directly to the SS server?

                      It pulls down JSON, but then parses it.

                      1 Reply Last reply Reply Quote 0
                      • F
                        flaxking
                        last edited by

                        I suggest looking into the salt Logstash engine

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