/build/static/layout/Breadcrumb_cap_w.png
02/17/2015 1825 views
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?
Answer Summary:
3 Comments   [ + ] Show comments

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!
  • Well, actually I created a smart label and then replaced the SQL in the smart label with the answer I posted.
  • OK that works too and gives me real time results. Thank You!

All Answers

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%'

Answered 02/17/2015 by: flip1001
Third Degree Brown Belt