Details

    • Type: Task Task
    • Status: To Do To Do (View Workflow)
    • Priority: Normal Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None Labels
    • Customer:
      NEP_3.X
    • Complexity:
      High

      Description

      Ensure NetXMS is ready for integration with NEP. (in progress) :

      2. Propose an arrangement of the different IT asset categories in the IT inventory Module.

      1. Prepare template for ESX servers/ Linux Machines / Windows Machine / Printers /

        Activity

        Mbaye Lo made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Task [ 3 ]
        Mbaye Lo made changes -
        Attachment ACE - Dashboard2.JPG [ 99776 ]
        Mbaye Lo made changes -
        Attachment ACE - Dashboard2.JPG [ 99776 ]
        Hide
        Mbaye Lo added a comment - - edited

        The below script performs SNMP queries to retrieve information about memory usage, hardware details, processor usage, and virtual machines hosted on the ESXi host. Adjust SNMP community string and OID definitions as needed based on your environment.

        /* !/bin/bash

        /* Usage: ./vmware_inventory.sh <ESXi_host_IP>

        /* Check if IP address is provided
        if [ -z "$1" ]; then
        echo "Usage: $0 <ESXi_host_IP>"
        exit 1
        fi

        /* Define ESXi host IP address
        ESXI_HOST="$1"

        /* SNMP community string
        SNMP_COMMUNITY="public"

        /* SNMP OID definitions
        MEMORY_USAGE_OID="HOST-RESOURCES-MIB::hrStorageUsed.1"
        HARDWARE_DETAILS_OID="VMWARE-MIB::vmwHwManufacturer.0"
        PROCESSOR_USAGE_OID="HOST-RESOURCES-MIB::hrProcessorLoad.1"
        VIRTUAL_MACHINES_OID="VMWARE-MIB::vmwVmName"

        /* Function to perform SNMP query
        snmp_query() {
        snmpwalk -v2c -c "$SNMP_COMMUNITY" "$ESXI_HOST" "$1" | awk -F ": " '

        {print $2}

        '
        }

        /* Retrieve memory usage
        MEMORY_USAGE=$(snmp_query "$MEMORY_USAGE_OID")

        /* Retrieve hardware details
        HARDWARE_DETAILS=$(snmp_query "$HARDWARE_DETAILS_OID")

        /* Retrieve processor usage
        PROCESSOR_USAGE=$(snmp_query "$PROCESSOR_USAGE_OID")

        /* Retrieve virtual machines
        VIRTUAL_MACHINES=$(snmp_query "$VIRTUAL_MACHINES_OID")

        /* Display gathered information
        echo "Memory Usage: $MEMORY_USAGE"
        echo "Hardware Details: $HARDWARE_DETAILS"
        echo "Processor Usage: $PROCESSOR_USAGE"
        echo "Virtual Machines:"
        echo "$VIRTUAL_MACHINES"

        =======================================================================

        /*# Define SNMP community string
        const SNMP_COMMUNITY = "public";

        /*# Define SNMP OID definitions
        const MEMORY_USAGE_OID = "HOST-RESOURCES-MIB::hrStorageUsed.1";
        const HARDWARE_DETAILS_OID = "VMWARE-MIB::vmwHwManufacturer.0";
        const PROCESSOR_USAGE_OID = "HOST-RESOURCES-MIB::hrProcessorLoad.1";
        const VIRTUAL_MACHINES_OID = "VMWARE-MIB::vmwVmName";

        /*# Function to perform SNMP query
        sub snmpQuery(host, oid)

        { return SNMP::get(host, SNMP_COMMUNITY, oid); }

        /*# Retrieve memory usage
        const memoryUsage = snmpQuery(node.ipAddress, MEMORY_USAGE_OID);

        /*# Retrieve hardware details
        const hardwareDetails = snmpQuery(node.ipAddress, HARDWARE_DETAILS_OID);

        /*# Retrieve processor usage
        const processorUsage = snmpQuery(node.ipAddress, PROCESSOR_USAGE_OID);

        /*# Retrieve virtual machines
        const virtualMachines = snmpQuery(node.ipAddress, VIRTUAL_MACHINES_OID);

        /*# Output gathered information
        console.print("Memory Usage: " + memoryUsage);
        console.print("Hardware Details: " + hardwareDetails);
        console.print("Processor Usage: " + processorUsage);
        console.print("Virtual Machines: " + virtualMachines);

        Show
        Mbaye Lo added a comment - - edited The below script performs SNMP queries to retrieve information about memory usage, hardware details, processor usage, and virtual machines hosted on the ESXi host. Adjust SNMP community string and OID definitions as needed based on your environment. /* !/bin/bash /* Usage: ./vmware_inventory.sh <ESXi_host_IP> /* Check if IP address is provided if [ -z "$1" ]; then echo "Usage: $0 <ESXi_host_IP>" exit 1 fi /* Define ESXi host IP address ESXI_HOST="$1" /* SNMP community string SNMP_COMMUNITY="public" /* SNMP OID definitions MEMORY_USAGE_OID="HOST-RESOURCES-MIB::hrStorageUsed.1" HARDWARE_DETAILS_OID="VMWARE-MIB::vmwHwManufacturer.0" PROCESSOR_USAGE_OID="HOST-RESOURCES-MIB::hrProcessorLoad.1" VIRTUAL_MACHINES_OID="VMWARE-MIB::vmwVmName" /* Function to perform SNMP query snmp_query() { snmpwalk -v2c -c "$SNMP_COMMUNITY" "$ESXI_HOST" "$1" | awk -F ": " ' {print $2} ' } /* Retrieve memory usage MEMORY_USAGE=$(snmp_query "$MEMORY_USAGE_OID") /* Retrieve hardware details HARDWARE_DETAILS=$(snmp_query "$HARDWARE_DETAILS_OID") /* Retrieve processor usage PROCESSOR_USAGE=$(snmp_query "$PROCESSOR_USAGE_OID") /* Retrieve virtual machines VIRTUAL_MACHINES=$(snmp_query "$VIRTUAL_MACHINES_OID") /* Display gathered information echo "Memory Usage: $MEMORY_USAGE" echo "Hardware Details: $HARDWARE_DETAILS" echo "Processor Usage: $PROCESSOR_USAGE" echo "Virtual Machines:" echo "$VIRTUAL_MACHINES" ======================================================================= /*# Define SNMP community string const SNMP_COMMUNITY = "public"; /*# Define SNMP OID definitions const MEMORY_USAGE_OID = "HOST-RESOURCES-MIB::hrStorageUsed.1"; const HARDWARE_DETAILS_OID = "VMWARE-MIB::vmwHwManufacturer.0"; const PROCESSOR_USAGE_OID = "HOST-RESOURCES-MIB::hrProcessorLoad.1"; const VIRTUAL_MACHINES_OID = "VMWARE-MIB::vmwVmName"; /*# Function to perform SNMP query sub snmpQuery(host, oid) { return SNMP::get(host, SNMP_COMMUNITY, oid); } /*# Retrieve memory usage const memoryUsage = snmpQuery(node.ipAddress, MEMORY_USAGE_OID); /*# Retrieve hardware details const hardwareDetails = snmpQuery(node.ipAddress, HARDWARE_DETAILS_OID); /*# Retrieve processor usage const processorUsage = snmpQuery(node.ipAddress, PROCESSOR_USAGE_OID); /*# Retrieve virtual machines const virtualMachines = snmpQuery(node.ipAddress, VIRTUAL_MACHINES_OID); /*# Output gathered information console.print("Memory Usage: " + memoryUsage); console.print("Hardware Details: " + hardwareDetails); console.print("Processor Usage: " + processorUsage); console.print("Virtual Machines: " + virtualMachines);
        Subversion JIRA

        Links Hierarchy

         Documentation

        Invalid license: EXPIRED

          People

          • Assignee:
            Mbaye Lo
            Reporter:
            Mbaye Lo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Planned Start:
              Planned End:

              Drag and Drop