8 Replies Latest reply on Feb 7, 2020 8:34 AM by Eslam Farrag

    Send custom report to a remote server

    Eslam Farrag
      Share This:

      Hi ,

       

      Currently I'm trying to send a custom report to a remote server using scp and will be running a cron job to do this task weekly. I have SSH connection to the server, however, when i try generation the below report using tw_query utility i get " tw_query: System communication error. Are the BMC Discovery services running? " after I type in the system password even when I add the system username and password to the query I get the same error.

       

      please find raw query below;

       

      tw_query --csv --file /usr/tideway/tmp/Hosts.csv search Host show #InferredElement:Inference:Associate:DiscoveryAccess.#Member:List:List:DiscoveryRun.label as 'Label', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name, os, vendor, model as 'Model', virtual, type as 'Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.name as 'Name', friendlyTime(creationTime(#)) as 'First Scan', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'Type', #Container:Containment:ContainedDrive:DiskDrive.model as 'Model', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'Model', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'Serial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'Name', #Container:Containment:ContainedDrive:DiskDrive.serial as 'Serial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'Size', #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.free_percentage as 'Free Percentage', #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.size as 'Size', #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.used_percentage as 'Used Percentage' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @0 as 'Label', @18 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.name as 'Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'Type', #Container:Containment:ContainedDrive:DiskDrive.model as 'Model', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'Model', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'Serial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'Name', #Container:Containment:ContainedDrive:DiskDrive.serial as 'Serial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'Size', @29 as 'Free Percentage', @30 as 'Size', @31 as 'Used Percentage' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @2 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Host Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Network Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType', #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel', #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName', @31 as 'Free Percentage', @32 as 'Size', @33 as 'Used Percentage' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @1 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Host Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Network Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType', #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel', #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName', @29 as 'Free Percentage', @30 as 'Size', @31 as 'Used Percentage', #Host:HostedSoftware:RunningSoftware:VirtualMachine.#RunningSoftware:HostedSoftware:Host:Host.name as 'ESXI Name' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @1 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Host Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Network Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType', #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel', #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName', @29 as 'Free Percentage', @30 as 'Size', @31 as 'Used Percentage', #ContainedHost:HostContainment:HostContainer:VirtualMachine.#RunningSoftware:HostedSoftware:Host:Host.name as 'ESXI Name' processwith where type <> 'Windows Desktop' show #ElementInLocation:Location:Location:Location.name as 'Location', @1 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', #InferredElement:Inference:Associate:DiscoveryAccess.#DiscoveryAccess:DiscoveryAccessResult:DiscoveryResult:DiscoveredWMIQuery.#List:List:Member:DiscoveredWMI.SystemSKU as 'Systemsku', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Host Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Network Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType', #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel', #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName', @29 as 'Free Percentage', @30 as 'Size', @31 as 'Used Percentage', @32 as 'ESXI Name' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @1 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Host Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Network Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType', #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel', #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName', @30 as 'Free Percentage', @31 as 'Size', @32 as 'Used Percentage', @33 as 'ESXI Name', system_SKUnumber as 'System Skunumber (system_SKUnumber)', MemoryPartNumber as 'Memorypartnumber', #ContainedHost:HostContainment:HostContainer:HostContainer.name as 'HostContainerName' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @1 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physical RAM', processor_type as 'Processor Type', processor_vendor as 'Processor Vendor', #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors', #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores', _all_cores_per_processor as 'All Cores Per Processor', serial as 'Host Serial Number', uuid as 'UUID', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Network Interface Name', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier', #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType', #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel', #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number', #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize', #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel', #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number', #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName', @29 as 'Free Percentage', @30 as 'Size', @31 as 'Used Percentage', @32 as 'ESXI Name', system_SKUnumber as 'System Skunumber (system_SKUnumber)', MemoryPartNumber as 'Memorypartnumber', #ContainedHost:HostContainment:HostContainer:HostContainer.name as 'HostContainerName', #Host:HostedSoftware:AggregateSoftware:BusinessApplicationInstance.name as 'Name' processwith show #ElementInLocation:Location:Location:Location.name as 'Location', @1 as 'First Scan', last_update_success as 'Last Update Success', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', name as 'Name', os as 'OS', vendor as 'Hardware Vendor', model as 'Model', virtual as 'Virtual', type as 'Host Type', logical_ram as 'Logical RAM', ram as 'Physicacat Hosts.csv

       

       

       

      Thanks in advance.

       

      Regards,

      Eslam Farrag

        • 1. Re: Send custom report to a remote server
          Bob Anderson

          What you have pasted appears to have been an original search, followed by several iterations of 'customizing' the search where the customizations appear to be re-arranging the attributes or adding attributes or removing attributes.  Every time you do a customization of the search, followed by a 'refresh results', you get another 'processwith' appended to the original query.


          There is so much going on, it it difficult to follow and time consuming to reduce down to the final query.

           

          You may have reached the limit of the command line buffer if you tried to excute this directly on the command line.

          Please reduce all these 'processwith' post processing to get a final search.  By doing this, you will greatly reduce the amount of text in your tw_query command.

           

          What was copied into this message post is incomplete.  You are missing the part of the query before the 'cat Hosts.csv', so we cannot determine what you really wanted

           

          BTW:  after reducing all the processwith statements and excluding the last incomplete processwith, your query boils down to this (which does work on the command line when enclosed with quotes):

           

          search Host where type <> 'Windows Desktop'

          show

          #ElementInLocation:Location:Location:Location.name as 'Location',

          friendlyTime(creationTime(#)) as 'First Scan',

          last_update_success as 'Last Update Success',

          #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address',

          name as 'Name',

          os as 'OS',

          vendor as 'Hardware Vendor',

          model as 'Model',

          virtual as 'Virtual',

          type as 'Type',

          logical_ram as 'Logical RAM',

          ram as 'Physical RAM',

          processor_type as 'Processor Type',

          processor_vendor as 'Processor Vendor',

          #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors',

          #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores',

          _all_cores_per_processor as 'All Cores Per Processor',

          serial as 'Serial Number',

          uuid as 'UUID',

          #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address',

          #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Interface Name',

          #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier',

          #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType',

          #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel',

          #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number',

          #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize',

          #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel',

          #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number',

          #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName',

          #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.free_percentage as 'Free Percentage',

          #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.size as 'Size',

          #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.used_percentage as 'Used Percentage',

          #ContainedHost:HostContainment:HostContainer:VirtualMachine.#RunningSoftware:HostedSoftware:Host:Host.name as 'ESXI Name',

          system_SKUnumber as 'System Skunumber (system_SKUnumber)',

          MemoryPartNumber as 'Memorypartnumber',

          #ContainedHost:HostContainment:HostContainer:HostContainer.name as 'HostContainerName',

          #Host:HostedSoftware:AggregateSoftware:BusinessApplicationInstance.name as 'Name'

          1 of 1 people found this helpful
          • 2. Re: Send custom report to a remote server
            Eslam Farrag

            I have added the above query to a cron file and added a line for scp to send the generated file to a remote server, however when i try to run tw_cron_update it fails with the below comment. what am i missing here?

             

            tw_cron_update

            /usr/tideway/bin/tw_cron_update: cron reported a problem: see logfile

             

            59 23 * * * tw_query --username=username --password=password --csv --file /usr/tideway/tmp/Hosts`date +%d%m%y`.csv "

            search Host where type <> 'Windows Desktop'

            show

            #ElementInLocation:Location:Location:Location.name as 'Location',

            friendlyTime(creationTime(#)) as 'First Scan',

            last_update_success as 'Last Update Success',

            #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address',

            name as 'Name',

            os as 'OS',

            vendor as 'Hardware Vendor',

            model as 'Model',

            virtual as 'Virtual',

            type as 'Type',

            logical_ram as 'Logical RAM',

            ram as 'Physical RAM',

            processor_type as 'Processor Type',

            processor_vendor as 'Processor Vendor',

            #Host:Detail:Hardware:ProcessorInfo.num_logical_processors as 'Number of Logical Processors',

            #Host:Detail:Hardware:ProcessorInfo.num_cores as 'Number of Cores',

            _all_cores_per_processor as 'All Cores Per Processor',

            serial as 'Serial Number',

            uuid as 'UUID',

            #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.mac_addr as 'MAC Address',

            #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.interface_name as 'Interface Name',

            #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:FibreChannelHBA.hba_id as 'HBA Identifier',

            #Container:Containment:ContainedDrive:DiskDrive.type as 'DiskDriveType',

            #Container:Containment:ContainedDrive:DiskDrive.model as 'DiskDriveModel',

            #Container:Containment:ContainedDrive:DiskDrive.serial as 'DiskDriveSerial Number',

            #Container:Containment:ContainedDrive:DiskDrive.size as 'DiskDriveSize',

            #ElementWithDetail:Detail:Detail:HardwareDetail.model as 'HardwareModel',

            #ElementWithDetail:Detail:Detail:HardwareDetail.serial as 'HardwareSerial Number',

            #ElementWithDetail:Detail:Detail:HardwareDetail.name as 'HardwareName',

            #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.free_percentage as 'Free Percentage',

            #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.size as 'Size',

            #Container:Containment:ContainedDrive:DiskDrive.#Provider:StorageUse:Consumer:FileSystem.used_percentage as 'Used Percentage',

            #ContainedHost:HostContainment:HostContainer:VirtualMachine.#RunningSoftware:HostedSoftware:Host:Host.name as 'ESXI Name',

            system_SKUnumber as 'System Skunumber (system_SKUnumber)',

            MemoryPartNumber as 'Memorypartnumber',

            #ContainedHost:HostContainment:HostContainer:HostContainer.name as 'HostContainerName',

            #Host:HostedSoftware:AggregateSoftware:BusinessApplicationInstance.name as 'Name'

             

             

            sshpass -p "Password" scp  -r /usr/tideway/tmp/Hosts`date +%d%m%y`.csv username@IPAddress:remote/path

            • 3. Re: Send custom report to a remote server
              Andrew Waters

              That would be because it does not have the environment defined to find tw_query., try using /usr/tideway/bin/tw_query

              1 of 1 people found this helpful
              • 4. Re: Send custom report to a remote server
                Eslam Farrag

                I have tried adding the line but I'm still getting the same error message below. any other suggestion would be appreciated

                /usr/tideway/bin/tw_cron_update: cron reported a problem: see logfile

                • 5. Re: Send custom report to a remote server
                  Andrew Waters

                  I can't see the closing double quote for the search query.

                  • 6. Re: Send custom report to a remote server
                    Eslam Farrag

                    The double quotes in the beginning and the end of the query is present but probably it was missed while pasting.

                    Let me put the steps maybe I'm missing a step;

                     

                    1. created a test.cron file
                    2. placed it in /usr/tideway/etc/cron/test.cron
                    3. executed tw_cron_update but sent an error message
                    • 7. Re: Send custom report to a remote server
                      Andrew Waters

                      Perhaps there are double quotes at the end of the query but there isn't in what you posted.

                      • 8. Re: Send custom report to a remote server
                        Eslam Farrag

                        You are correct. Is there anyway i can troubleshoot the issue further? I'm able to successful execute the command, so the problem is not with with the query syntax.