16 Replies Latest reply on Oct 9, 2014 1:57 PM by russo1203

    Collecting File Information

    SolarWinds Community Team

       

      Good Afternoon,

      I have created a report in hopes of locating workstations with a particular executable residng on the machine. However, I am receiving no results. I have configured the inventory to include both Files and Directories by placing the appropriate check mark on the Datasource configuration tab. Is this not the appropriate or only measure required? Is this data not collected? When creating the report I am able to select the File(Name) and enter the file that I am looking for. I would assume this means that the data is being collected.

      Thank you.

        • Re: Collecting File Information
          SolarWinds Community Team

           

          Hi russo1203,

           

          There are a couple of things that may be happening here.

          1.  In the Inventory Configuration Editor, after you clicked to collect file and directory information on the Datasource Configuration tab, did you click on the "File, Directory and Registry Datasource Configuration" tab to specify which files and directories to include?  It is the box near the middle of that tab that references "file system object".

          2.  If you did specify them there and successfully saved your new Inventory Configuration template, please note that existing scheduled Inventory tasks will cannot use the new Inventory Template.  You will need to create a new Inventory task and select "Inventory - include specific datasources", then "Select a pre-defined inventory configuration template", choose your new template, then scheduled it to run as you wish.

           

          -Kelly

           

           

            • Re: Collecting File Information
              SolarWinds Community Team

               

              Kelly,

              I did not add any files or directories on this tab of the Inventory Configuration. As someone that previously utilized SMS 2003, I am used to the .exe information being included in the inventory. I did search and find another post mentioning the use of wildcards is not supported.

              Would you say that the functionality is such that one would need to create a special inventory to run and include only the .exe that I am looking for, or is there a way to collect all .exe information and store in the database? Thank you for your time and assistance with this matter.

                • Re: Collecting File Information
                  SolarWinds Community Team

                   

                   

                  No, there is not currently a way to gather all .exe information.   I'll submit your query (allow wildcards so as to allow gathering information on all files of a particular type during inventory) as a Feature Request to development for review.

                   

                  Whether to create a special inventory task is a matther of opinion really.  If looking for a particular .exe is something you routinely do and you need it to be accurate to the last time a scheduled inventory is run then I would modify an Inventory Configuration template and create new scheduled Inventory tasks using that template to replace my old scheduled tasks.

                  If it's more of an as-needed activity, or if the particular file in question that you want to look for may change often, I would likely just do a one-off inventory task targeted at the machines you are interested in when needed.

                   

                    • Re: Collecting File Information
                      russo1203

                      So 2 years later, i am revisiting this. I have created a new inventory seraching for a file. My question is how do I report on this information? Thanks.

                        • Re: Collecting File Information
                          Lawrence Garvin

                          In the Files, Directories, and Storage Devices report category, run the Files Basic report, which will show all inventoried files.. Customize as necessary.

                          • Re: Collecting File Information
                            KMSigma

                            Russo1203:

                             

                            Could you let me know the "why" you are doing this? I can see a few reasons for this, but was wondering what drove you needing this.

                             

                            Thanks,

                            KMSigma

                              • Re: Collecting File Information
                                russo1203

                                We are looking for workstations that have Cygwin installed, i.e. C:\Cygwin64\bin\bash.exe. Any assistance is appriciated.

                                  • Re: Collecting File Information
                                    KMSigma

                                    Dare I ask...Shellshock?

                                    • Re: Collecting File Information
                                      Lawrence Garvin
                                      We are looking for workstations that have Cygwin installed, i.e. C:\Cygwin64\bin\bash.exe. Any assistance is appriciated.


                                      Have you tried just a simple Installed Programs report? If you've already done a WMI Inventory, then collecting information about installed programs is on by default.

                                      Run the Installed Programs and Feature Basic report in the Installed Programs and Features report category, and filter as necessary.

                                        • Re: Collecting File Information
                                          KMSigma

                                          I think that part of the burn here is that older versions of Cygwin (if I'm remembering right) can just be downloaded as a ZIP and dropped in a file location.

                                            • Re: Collecting File Information
                                              Lawrence Garvin
                                              can just be downloaded as a ZIP and dropped in a file location.

                                              Hmm.. that would complicate things a lot.

                                              That also means there's no guarantee as to the actual installation pathname.


                                              One would almost have to do a DIR /s /p | FIND /i "bash.exe" from the ROOT of every drive in that case.


                                              Were that the case, I'd say put that in a script and run it across the network overnight


                                              For Each $machine in (list of $machines)

                                                  ECHO $machine >> BashTestOut.txt

                                                  DIR /s /p \\$machine\c$ | FIND /i "bash.exe" >> BashTestOut.txt


                                              Or you could get a bit more fancy and use PSEXEC to run the DIR on the remote machine and then just copy back the output file across the network


                                              For Each $machine in (list of $machines)

                                                  ECHO $machine >> BashTestOutMaster.txt

                                                  PSEXEC \\$machine DIR /s /p C: | FIND /i "bash.exe" >> BashTestOut.txt

                                                  COPY \\$machine\c$\BashTestOut.txt >> BashTestOutMaster.txt


                                              One could also do that in PowerShell too. :-)

                                                • Re: Collecting File Information
                                                  russo1203

                                                  Agreed that there is no easy way to find bash.exe without having a more powerful tool iin place (LANDesk, SCCM). Most of our installs should be in the default location, C:\Cygwin64\bin\bash.exe or C:\Cygwin\bin\bash .exe, however, I created an inventory template as seen in the attached image and ran it against my workstation in which C:\Cygwin64\bin\bash.exe exists, but when runing the Files Basic report, the results do not show any files. Are there inventory logs anywhere? Thanks to all.

                                                   

                                                  In answer to above:

                                                  re I ask...Shellshock?   ---   Oh yes!

                                                  Have you tried just a simple Installed Programs report?   ---   Yes, Cygwin does not appear in Installed Programs and Feature.

                                                  Cygwin_inventory.JPG

                                                    • Re: Collecting File Information
                                                      Lawrence Garvin

                                                      but when runing the Files Basic report, the results do not show any files


                                                      My conclusion would be that there are no installations in that folder ... or that the inventory did not execute at all.

                                                      If you *know* there are actual installations, then the latter would be the logical conclusion.

                                                       

                                                      Are there inventory logs anywhere?

                                                       

                                                      Not directly, but you could enable logging on the Automation Role server(s) performing this task.

                                                      In the Managed Computers node, on a per-node basis, you can inspect the Last Inventory Attempt Time, Last Contact Time, and the Collection Times (in the Computer Inventory Details tab), to verify that the File datasource was collected.

                                                      10-9-2014 12-27-04 PM.png

                                                      NOTE: In addition to configuring the "File, Directory, and Registry Datasource" dialog, as you've done above, you must also explicitly ENABLE the File option under Files, Directories, and Storage Devices on the "Datasource Configuration" tab of the ICE.

                                                      10-9-2014 12-24-22 PM.png

                                                    • Re: Collecting File Information
                                                      KMSigma

                                                      If everything is using newer versions of Windows, I have a PoSH script that could be repurposed.