/build/static/layout/Breadcrumb_cap_w.png

Creating groups of servers based on whether network card is DHCP or static.

Hello,

    In my current environment of servers some are Static and others are DHCP. I am looking to create a groups based on whether a server's network card is using a static IP address or DHCP. I noticed in the inventory section of Kace that the detail page for every machine has a NIC section that shows you whether or not your NIC is DHCP or Static. But when I go to create a smart label, there is no filter that includes the NIC as a parameter. Has anyone been able to write a script that can query each machine for its NIC details?

3 Comments   [ + ] Show comments
  • Thank You flip1001. This query worked great. I ran it under the reporting portion of my Kace appliance as a SQL command. Thanks Again! - kyhec7249 9 years ago
  • Well, actually I created a smart label and then replaced the SQL in the smart label with the answer I posted. - flip1001 9 years ago
  • OK that works too and gives me real time results. Thank You! - kyhec7249 9 years ago

Answers (1)

Answer Summary:
Posted by: flip1001 9 years ago
Black Belt
1
Change DHCP Enabled to True or False and also change the IP to what your network uses. I put an IP otherwise you might pickup on virtual nics.

SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE
WHERE (1 in (SELECT 1 FROM MACHINE_NICS WHERE MACHINE.ID = MACHINE_NICS.ID AND MACHINE_NICS.DHCP_ENABLED = 'False' AND MACHINE_NICS.IP LIKE '172.16.%'))
AND MACHINE.OS_NAME LIKE '%SERVER%'

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ