spiceworks tutoriel en

Upload: eliezer-de-sousa-oliveira

Post on 29-Oct-2015

183 views

Category:

Documents


3 download

TRANSCRIPT

  • Profile : http://community.spiceworks.com/profile/show/myprofile?tab=shared

    SPICEWORKSSPICEWORKSSPICEWORKSSPICEWORKS

    TUTORIAL

    20 juillet 2012 Created by : Alexandre37

    : http://community.spiceworks.com/profile/show/myprofile?tab=shared

    SPICEWORKSSPICEWORKSSPICEWORKSSPICEWORKS

    Summary

    : http://community.spiceworks.com/profile/show/myprofile?tab=shared

  • 1

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    SPICEWORKSSPICEWORKSSPICEWORKSSPICEWORKS

    Summary

    1 OPENING SPICEWORKS .................................................................................................. 2

    2 DASHBOARD .............................................................................................................. 4

    3 SETTING SPICEWORKS .................................................................................................... 4

    3.1 NETWORK SCAN ................................................................................................... 6 3.1.1 SETUP IPS RANGE ............................................................................................. 6

    3.1.2 CONFIGURE WINDOWS/SSH/SNMP ACCOUNTS....................................................... 8

    3.1.3 SCHEDULED SCANS ........................................................................................... 9 3.1.4 SCAN ERRORS ................................................................................................. 9

    3.2 ACTIVE DIRECTORY ............................................................................................... 10

    3.2.1 SYNCHRONIZE ACTIVE DIRECTORY WITH SPICEWORKS ............................................... 10

    3.2.2 ADS SYNCHRONIZATION FREQUENCY ................................................................... 10 3.2.3 SYNCHRONIZE SPICEWORKS WITH ACTIVE DIRECTORY ............................................ 11

    3.2.4 ADDITIONAL ACTIVE DIRECTORY SETTINGS ............................................................ 11

    3.3 ADVANCED & INTERNATIONAL OPTIONS ...................................................................... 12 3.3.1 PROXY CONFIGURATION .................................................................................. 12

    3.3.2 MODIFYING SPICEWORKS LANGUAGE AND TIME/DATE FORMAT .................................... 12

    3.4 MANAGING SPICEWORKS USERS ................................................................................ 13

    4 AFTER THE NETWORK SCAN ........................................................................................... 13 4-1- SEARCHING NETWORK RESOURCES .............................................................................. 13

    4-2- CREATING NEW GROUPS .......................................................................................... 16

    4-3- MODIFYING RESOURCES ATTRIBUTS. ........................................................................... 17 IN ADDITION, A DEVICE CAN BELONG TO SEVERAL GROUPS, JUST ADD THEM LIKE ABOVE. ................... 17

    4-4 PURCHASE MANAGEMENT. ....................................................................................... 17

    4-5 VISIT ACTIVE DIRECTORY PEOPLE. ............................................................................... 18

    5 SPICEWORKS DATA BASE............................................................................................... 20 5.1 DATA BASE EDITION ............................................................................................... 20

    5.2 MAIN TABLES ....................................................................................................... 22

    5.3 MAKING REPORTS ................................................................................................. 23 5.3.1 REPORTS AND WIDGETS. ..................................................................................... 25

    5.3.2 SHARING REPORTS ............................................................................................. 27

    6 SCAN ERRORS ............................................................................................................ 30

    1 TIMEOUT WAITING FOR WMI CONNECTION .................................................................... 30 2 RPC SERVER IS UNAVAILABLE WINDOWS #800706BA ........................................................ 31

    3 NO OPEN PORTS FOR THIS DEVICE WERE FOUND TO BE RESPONDING. ...................................... 32 4 CONFIGURATION BACKUP REQUIRES AN SSH OR TELNET ACCOUNT ....................................... 33

    7 CONNECTING SPICEWORKS DATA BASE THANKS TO ODBC ..................................................... 35

    1 - INTRODUCTION ...................................................................................................... 35 2 - WHAT DO WE NEED ? ................................................................................................ 35

    3 - INSTALL AND CONFIGURE ODBC FOR SQLITE .................................................................. 35

    4 - USING ODBC WITH EXCEL ......................................................................................... 38

    5 - CONCLUSION ...................................................................................................... 42 8 BULK IMPORT ......................................................................................................... 43

  • 2

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    1 1 1 1 Opening SpiceworksOpening SpiceworksOpening SpiceworksOpening Spiceworks

    Since Spiceworks is installed, you may want to launch it.

    Maybe you could get this error :

    Error or not, there are two ways to launch Spiceworks : local or remotly. - Locally, enter the following URL: http://localhost/splash

    If the machine on which Spiceworks is installed has for FQDN : SRV-SPICEWORKS ; If Spiceworks is configured for using the X port.

    - Remotely, enter the following URL : http://srv-spiceworks:X/splash ,

    Of course, you can replace the FQDN by the Spiceworks servers Ip address. Once Spiceworks is launched, its icon appears in the notification area. By clicking on it, you can access Spiceworks preference.

    Setup here the famous X port you want Spiceworks to use.

    In Startup Options, if you check the Spiceworks is running as a service option, as Windows service, you can start/stop it from

  • 3

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    the command prompt by executing the following command : net start/stop Spiceworks. The service is set on automatic so it will be launched at the same time as the OS. As a service, Spiceworks wont appear anymore in the notification area.

    If you are using Spiceworks for the first time, you will have to create an account, only after you will be able to login as below :

  • 4

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    2 2 2 2 DashboardDashboardDashboardDashboard

    Once you are connected, by default, Spiceworks will load the Dashboard page, which could change.

    At the top of the page, you will find the main menus

    - Community : It give you access to the Spiceworks community(help, share, tutorials) - Inventory : Allow you to configure Spiceworks. - HelpDesk : Help module of Spiceworks

    - Purchasing : To handle your purchase.

    3 3 3 3 Sett ingSett ingSett ingSett ing SpiceworksSpiceworksSpiceworksSpiceworks

    To setup Spiceworks, Inventory>Settings :

  • 5

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    Well, as you can see, there are many things to setup. Lets check how to.

  • 3.1 3.1 3.1 3.1 Network ScanNetwork ScanNetwork ScanNetwork Scan

    This is where you want to go when you want to specify what IPs you want t

    3.13.13.13.1.1.1.1.1 Setup IPs rangeSetup IPs rangeSetup IPs rangeSetup IPs range

    To add a new scan entry, simply click on click here to add a

    This is where you want to go when you want to specify what IPs you want to scan. Below, see what it look

    click here to add a new scan entry .

    6

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    o scan. Below, see what it looks like.

  • 7

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    I want to scan the following range : 192.168.1.because this is equivalent to 192.168.1.1-254

    It is the same for the following bytes. If I want to scan from with 192.168.1-10.1-254.

    If you have disjoint ranges, the syntax will be RANGE_1 SPACE RANGE_2 or RANGE_1 RANGE_2 without the of course. Example : 192.168.1-10.1-254 192.168.

    Instead of disjointing ranges, you can make it contiguous then exclude what you dont want to scan. Ssame rules as above.

    If you check the Custom Scan Settings then you

    192.168.1.1 to 192.168.1.254. Will i want to write each ip addresses254.

    for the following bytes. If I want to scan from 192.168.1.1 192.168.10.254, I will fill the Device/Range field

    disjoint ranges, the syntax will be RANGE_1 SPACE RANGE_2 or RANGE_1 RANGE_2 without the of 192.168.12-14.1-254.

    Instead of disjointing ranges, you can make it contiguous then exclude what you dont want to scan. S

    If you check the Custom Scan Settings then you will be able to schedule the scan execution.

    Will i want to write each ip addresses ? No I will not

    I will fill the Device/Range field

    disjoint ranges, the syntax will be RANGE_1 SPACE RANGE_2 or RANGE_1 RANGE_2 without the of

    Instead of disjointing ranges, you can make it contiguous then exclude what you dont want to scan. Scan exclusions follow the

  • You can also order your scan entries by clicking on the upper right button.

    Uncheck a scan entry to disable it temporarily.

    3.1.2 3.1.2 3.1.2 3.1.2 Conf igureConf igureConf igureConf igure Windows/SSH/SNMPWindows/SSH/SNMPWindows/SSH/SNMPWindows/SSH/SNMP

    How do Spiceworks to pull up data from your network Windows OS. It is necessary to configure corresponding accounts so you wont get scan errors. If errors occur, you can check the tutorials error section.

    There are different ways to connect remotelyprotocol. According to your policy, you will have to configure properly the corresponding accounts.

    - Windows account allows you to fill the administ- Telnet, SSH, HTTP accounts will be used for SNMP devices.- SNMP account will specify the community to use. By default, the public community is enabled. You can create a new one for are configured to work with it. Once your accounts have been created, if they need to be modified, you will find at the bottom of the scanyou can edit your scan entries and specify accounts they will need if this has not been done yet.

    You can also order your scan entries by clicking on the upper right button.

    Uncheck a scan entry to disable it temporarily.

    Windows/SSH/SNMPWindows/SSH/SNMPWindows/SSH/SNMPWindows/SSH/SNMP accountsaccountsaccountsaccounts

    from your network resources? By using SNMP protocolWindows OS. It is necessary to configure corresponding accounts so you wont get scan errors. If errors occur, you can check

    remotely to network resources. This can be performed by using telnet, ssh, http protocol. According to your policy, you will have to configure properly the corresponding accounts.

    you to fill the administrator account of the domain. accounts will be used for SNMP devices.

    SNMP account will specify the community to use. By default, the public community is enabled. You can create a new one for the private communi

    accounts have been created, if they need to be modified, you will find at the bottom of the scanyou can edit your scan entries and specify accounts they will need if this has not been done yet.

    8

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    By using SNMP protocol or WMI for machines using Windows OS. It is necessary to configure corresponding accounts so you wont get scan errors. If errors occur, you can check

    to network resources. This can be performed by using telnet, ssh, http protocol. According to your policy, you will have to configure properly the corresponding accounts.

    private community if your network devices

    accounts have been created, if they need to be modified, you will find at the bottom of the scans settings page. Now

  • 9

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    3.1.3 3.1.3 3.1.3 3.1.3 Scheduled scansScheduled scansScheduled scansScheduled scans

    Instead of creating for each scan entry a specific scheduled scan, you can setup a global scheduled scan for all entries.

    3.1.4 3.1.4 3.1.4 3.1.4 Scan errorsScan errorsScan errorsScan errors

    If after your scan you get errors, refer to the tutorial errorssection.

  • 3.2 3.2 3.2 3.2 Act ive directoryAct ive directoryAct ive directoryAct ive directory

    3.2.1 3.2.1 3.2.1 3.2.1 SynchroniSynchroniSynchroniSynchronize Active Directory with Spiceworksze Active Directory with Spiceworksze Active Directory with Spiceworksze Active Directory with Spiceworks

    Spiceworks offers you to synchronize your Activenecessary to fill the administrator credentials of your AD server.

    3.2.2 3.2.2 3.2.2 3.2.2 ADs synchronizat ion frequencyADs synchronizat ion frequencyADs synchronizat ion frequencyADs synchronizat ion frequency

    Now you are able to synchronize your AD with Spiceworks, you can specify a frequency to reoccurred.

    This being said, once you checked AD scanning

    In that case, uncheck, wait about 3 minutes and check again. That should solve this problem. By the way, you can use this method to force AD synchronization if you dont want to wait 30 minutes.

    ze Active Directory with Spiceworksze Active Directory with Spiceworksze Active Directory with Spiceworksze Active Directory with Spiceworks

    Spiceworks offers you to synchronize your Active Directory. The result will be available in settings>people.necessary to fill the administrator credentials of your AD server.

    ADs synchronizat ion frequencyADs synchronizat ion frequencyADs synchronizat ion frequencyADs synchronizat ion frequency

    Now you are able to synchronize your AD with Spiceworks, you can specify a frequency to re-synchronize in case changes

    AD scanning , you may have the following error.

    In that case, uncheck, wait about 3 minutes and check again. That should solve this problem. By the way, you can use this if you dont want to wait 30 minutes.

    10

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    in settings>people. For this, it is

    synchronize in case changes have

    In that case, uncheck, wait about 3 minutes and check again. That should solve this problem. By the way, you can use this

  • 11

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    3.2.3 3.2.3 3.2.3 3.2.3 Synchronize Spiceworks with Act ive DirectorySynchronize Spiceworks with Act ive DirectorySynchronize Spiceworks with Act ive DirectorySynchronize Spiceworks with Act ive Directory

    The above operation can be reversed thanks to this option. If yoallows Spiceworks to overwrite Active Directory

    3.2.4 3.2.4 3.2.4 3.2.4 Additional Active Additional Active Additional Active Additional Active DirectoryDirectoryDirectoryDirectory

    When importing Active Directory, you might want to import only some of your UO. Here you can specify your corrBase DN of your choice.

    Moreover, if an AD user doesnt have its email address filled, Spiceworks will not import it. The option Use principal name for email if blank in AD allows Spiceworks to import

    Synchronize Spiceworks with Act ive DirectorySynchronize Spiceworks with Act ive DirectorySynchronize Spiceworks with Act ive DirectorySynchronize Spiceworks with Act ive Directory

    The above operation can be reversed thanks to this option. If you did any changes in Spiceworks>Spiceworks to overwrite Active Directorys data so you will not have to make the changes twice.

    DirectoryDirectoryDirectoryDirectory sett ingssett ingssett ingssett ings

    When importing Active Directory, you might want to import only some of your UO. Here you can specify your corr

    email address filled, Spiceworks will not import it. The option Use principal name for email if blank in AD allows Spiceworks to import contact even if the AD user does not have an email address filled.

    u did any changes in Spiceworks>settings>people, this option data so you will not have to make the changes twice.

    When importing Active Directory, you might want to import only some of your UO. Here you can specify your corresponding

    email address filled, Spiceworks will not import it. The option Use principal name for an email address filled.

  • 3.3 3.3 3.3 3.3 Advanced & Internat ional Opt ionsAdvanced & Internat ional Opt ionsAdvanced & Internat ional Opt ionsAdvanced & Internat ional Opt ions

    3.3.1 3.3.1 3.3.1 3.3.1 Proxy Conf igurationProxy Conf igurationProxy Conf igurationProxy Conf iguration

    In case your network is running through a proxy, you will have to fill the

    3.3.2 3.3.2 3.3.2 3.3.2 Modifying Spiceworks language and Modifying Spiceworks language and Modifying Spiceworks language and Modifying Spiceworks language and

    If you are french like me, you might want to change hour and date format like I did below. This is very intuitive, look at thvariables, %H for hours You have an explanation Spiceworks interface is natively using the English language however you can change it. If your language is not in the list, go check the available Language Packs created by the community.

    Advanced & Internat ional Opt ionsAdvanced & Internat ional Opt ionsAdvanced & Internat ional Opt ionsAdvanced & Internat ional Opt ions

    a proxy, you will have to fill the information below.

    Modifying Spiceworks language and Modifying Spiceworks language and Modifying Spiceworks language and Modifying Spiceworks language and time/date formattime/date formattime/date formattime/date format

    If you are french like me, you might want to change hour and date format like I did below. This is very intuitive, look at than explanation for every of them by clicking on the Date/Time Forma

    interface is natively using the English language however you can change it. If your language is not in the list, go check the available Language Packs created by the community.

    12

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    If you are french like me, you might want to change hour and date format like I did below. This is very intuitive, look at the licking on the Date/Time Formatting ? link.

    interface is natively using the English language however you can change it. If your language is not in the list, go

  • 13

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    3.4 3.4 3.4 3.4 Managing Spiceworks usersManaging Spiceworks usersManaging Spiceworks usersManaging Spiceworks users

    When you are first logging into Spiceworks, it creates your profile here. Maybe you want to give a Spiceworks access to your teammates. Add their account here.

    4 4 4 4 Af ter the network scanAfter the network scanAfter the network scanAfter the network scan

    4444----1111---- Searching network resourcesSearching network resourcesSearching network resourcesSearching network resources

    Now the scan has been performed, you can pay a visit to your network devices in Inventory>devices.

  • Spiceworks has default categories to sort devices according to the type they belong to. Of course, you can create custom categories so you can sort them to your wishes by making advanced filters.

    Nice trick if you are allergic to the previous display mode. You can switch

    Search the device you want to look at and then click on it.

    Spiceworks has default categories to sort devices according to the type they belong to. Of course, you can create custom them to your wishes by making advanced filters.

    Nice trick if you are allergic to the previous display mode. You can switch it like below.

    Search the device you want to look at and then click on it.

    14

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    Spiceworks has default categories to sort devices according to the type they belong to. Of course, you can create custom

  • 15

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    You have useful extra-tools if you need to test

    tools if you need to test some things.

  • 16

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    4444----2222---- Creating new groupsCreating new groupsCreating new groupsCreating new groups

    You want to create a new group ? For sure ! Then click on the upper right gear !

    I am creating a group named Mon groupe . I want this group to gather all the devices with a mac address beginning with

    00:. Okay, this is damn useless but it is just an example. You can make such more advanced filters.

  • 17

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    4444----3333---- Modify ing resources Modify ing resources Modify ing resources Modify ing resources attr ibutesattr ibutesattr ibutesattr ibutes ....

    Sometimes, some devices may contain corrupted information or maybe you just want to change/add some. Likely, you can edit devices information. If the devices got the write right, then Spiceworks will push it back to the devices ! How nice.

    In addition, a device can belong to several groups, just add them like above.

    4444----4 4 4 4 Purchase managementPurchase managementPurchase managementPurchase management ....

  • 18

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    You can attach to a device :

    - a ticket - A purchase - A warranty

    If you need to create a ticket for a device for any reason, for a better management, you can attach it to the device. The purchase thing allows you to fill a monthly cost for a period that finally comes to give you the total cost. Imagine this has been done for all your devices. A simple SQL request could tell you wonderful things about your whole network. The warranty thing allows you to remind when time has come for renewing contracts as an example.

    4444----5 5 5 5 Visi t Act iveVisi t Act iveVisi t Act iveVisi t Act ive DirectoryDirectoryDirectoryDirectory peoplepeoplepeoplepeople ....

    To visit your people then go to Inventory>People.

  • 19

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    To access people properties, just click on it. To modify its attributes, it is as pretty exactly as for the devices, proceed in the same way. Keep in mind that if you did make changes, they will be pushed up from Spiceworks to AD if you check the right

    option.

    Something interesting is that you can associate devices to an ad user. Among them, one will be the primary and others

    secondarys. It is just matter of choices.

    For example, I am going to associate a computer to an ad_user. Oh no, I have like 500 people in my AD. I dont want to grind

    #.-. Dont worry, we will see later how to make it more kindly.

  • 20

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    5 5 5 5 Spiceworks data base.Spiceworks data base.Spiceworks data base.Spiceworks data base.

    5.1 5.1 5.1 5.1 Data base edit ionData base edit ionData base edit ionData base edit ion

    Spiceworks uses a data base to stock and order data. This data base is compatible with SQLITE3. I will guess you are not using IE but Firefox or Chrome. In this case, install the SQLITE3 module. Then, you are able to open the database from your internet browser.

    Open the SQLITE module and browse your hard drive into your Spiceworks folder ../Spiceworks/db/Spiceworks_prod.db. You may have to change the file extension to see it because it is .db and not .sqlite.

    If you want to execute a SQL request, go to Execute SQL and fill your SQL code. If you want to browse the data base and see what tables are containing, go to browse and search. Select a table on the left and have a look at it.

  • 21

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    For example, I want to see several information of the ad_users table. Below, you have the SQL request code and the result.

  • 22

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    5.2 5.2 5.2 5.2 Main tablesMain tablesMain tablesMain tables

    It depends on what you want to do but the main tables look like to be :

    - Ad_users(id, attributes, user_id) - Users(id, attributes ) - Devices(id, attributes, user_id)

    Tables ad_users and devices are linked by the users table. That means it will be possible to relate attributes from ad_users and devices in order to get extra information by joining them.

    The devices table obviously stores several information about the devices. The users table basically contains all the users defined in Spiceworks (admin account, manual creation of people). The ad_users table stores all the data that are filled in your AD. Actually, this table is just an image of what you have in your AD.

    When you check the AD scanning option, firstly the ad_users is filled and then Spiceworks copy chosen information into its own users table users. If you do some manual editions to change information, these information will only be modified in the users table. On the other hand, if you check Sync changes with AD, this time what you did change in the users table will change the ad_users.

    Of course, there are a lot more of tables. You will have to browse them if you need specific information to get the tables name.

  • 23

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    5.3 5.3 5.3 5.3 Making reportsMaking reportsMaking reportsMaking reports

    There is another way to execute SQL request. Spiceworks includes a report module. You can find it in Inventory>Reports.

    By clicking on New Report , you will be able to create a custom SQL request. You can save it to execute it later.

    Give a name and a description to your report. You can make it public. That means users defined to log into Spiceworks will be able to see your own reports. If you want to make it public to the community, you will have to share it. By the way, the display is customizable but what you see on your dashboard only concerns your profile.

    Check the Build this reports using SQL to create your report as a SQL request. At the end, click on Save and run.

  • 24

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    If you go back to inventory>Reports, you will see your new report to appear. By clicking on the arrow, more options will be

    offered. Run, edit, share, export or delete.

  • 25

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    5.3.1 Reports and Widgets.5.3.1 Reports and Widgets.5.3.1 Reports and Widgets.5.3.1 Reports and Widgets.

    You can display the results from your SQL request as a graph : pie or bar. When you are creating your SQL report, check Make this report available as a widget.

  • 26

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    If you run again your reports, youll see the graph by now ! However, to display SQL results as a widget, you will have to invert line and column in order to give them a legend. For example, making a sum on a row will need to do this. Usual SQL request could be for example: SELECT column1 As Column 1, column2 As Column 2 FROM TABLE WHERE column1 = condition; The result will be display like this.

    Column1 Column2 Value 1 Value 2

    To get this working as a widget, you will have to write your request so the result be displayed like this :

    X Y=F(X) Column1 Value 1 Column2 Value 2

    The equivalent request for this can be like this :

    SELECT Column 1, column1 As Y=F(X) FROM TABLE WHERE column1 = condition UNION SELECT Column 2, column2 FROM TABLE WHERE column1 = condition

    This way, the SQL request will be available as a widget. You have to notice that that you can choose the name Y=F(X) however the X name will be the set at Column 1 by default and I dont know how to fix this but it doesnt really matter.

    Using this request :

    SELECT 'TOTAL SIZE (TB)', round((SUM(size))/(1024*1024*1024*1024.0),2) As 'SIZE_TB' FROM disks WHERE description like '%Local Disk%' and name not like '%syst%' and name not like '%recovery%'; UNION SELECT 'USED SPACE (TB)', round((SUM(size)-SUM(free_space))/(1024*1024*1024*1024.0),2) FROM disks WHERE description like '%Local Disk%' and name not like '%syst%' and name not like '%recovery%'; UNION SELECT 'FREE SPACE (TB)', round(SUM(free_space)/(1024*1024*1024*1024.0),2) FROM disks WHERE description like '%Local Disk%' and name not like '%syst%' and name not like '%recovery%';

  • 27

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    ORDER BY SIZE_TB DESC

    From what I said, the SQL result will be displayed like this :

    TOTAL SIZE SIZE_TB TOTAL SIZE VALUE 1 USED SPACE VALUE 2 FREE SPACE VALUE 3

    After running the report, this is what you get :

    5.3.2 Sharing reports5.3.2 Sharing reports5.3.2 Sharing reports5.3.2 Sharing reports

    You can share your reports.

  • 28

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    Assuming you have modified your SQL request for X reason and you want to update it, the procedure is the same as sharing. Click again on share for the reports you want to update then Spiceworks will ask you if you wish to update it !. If you want to save the old version, rename your old report as a new one, create a new report with the same name like the previous one then share so Spiceworks will ask you if want to update.

    Once shared, Spiceworks will lead you to this page.

  • 29

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    If you want to take a look to your shares, then go to My Profile.

    Click on Shared Items.

    Then you will have an overview of your shares.

  • 30

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    6666 Scan errorsScan errorsScan errorsScan errors

    1 Timeout Waiting for WMI ConnectionTimeout Waiting for WMI ConnectionTimeout Waiting for WMI ConnectionTimeout Waiting for WMI Connection

    WMI uses DCOM protocol to connect itself to the machines. If is not activated, WMI will not work and Spiceworks will pull up this kind of errors. Moreover, the machine hosting Spiceworks must be allowed by the remote machines to use this protocol. To check if the WMI protocol is started on a machine

    - Open a command prompt - Write the following command line :

    If the result is the service is already started, then the problem does not come from here. Else, you will have to deploy the following GPO so the WMI service will automatically launch itself at Windows startup. Computer Config > Policies > Windows Settings > Security Settings > Windows Firewall with Advanced Security > Windows Firewall with Advanced Security > Inbound Rules node. Edit this GPO and choose allow connection .

    Now the WMI service is started, you have to allow the traffic between remote machines and the Spiceworks server. Again, you have to edit the following GPOs :

    - DCOM : Machine access restrictions in security

    - DCOM : Machine launch restrictions in security

    You will find the GPO in :

    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options

  • 31

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    2 2 2 2 RPC Server is unavailable Windows #800706BARPC Server is unavailable Windows #800706BARPC Server is unavailable Windows #800706BARPC Server is unavailable Windows #800706BA

    There are two ways to proceed : 1. Command prompt

    1.1. For Windows XP

    1.1.1. If the machine is in the same subnet or network as the Spiceworks server. c:\> netsh firewall set service remoteadmin enable subnet

    1.1.2. If the machine is in another subnet or networt as the Spiceworks server. c:\> netsh firewall set service remoteadmin enable

    1.2. For Windows Vista/7 c:\> netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes

    firewall set rule group="remote administration" new enable=yes

    2. Using GPOs You have to allow these GPOs.

    - Windows Firewall: Allow remote administration exception

    - Windows Firewall: Allow ICMP exceptions

    You will find them in : Computer Configuration/Administrative Templates/Network/Network Connections/Windows Firewall/Domain Profile

  • 32

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    3 3 3 3 No open ports for this device were found to be responding.No open ports for this device were found to be responding.No open ports for this device were found to be responding.No open ports for this device were found to be responding.

    There are several reasons for this error

    - Incorrect permissions for WMI - Incorrect DNS informations - Windows Firewall is blocking ports - Antivirus is blocking ports

    1 Permissions incorrectes pour WMI

    Check the number one point.

    2 Information DNS incorrectes

    If this error was not due to the WMI thing, it is probably because of the DNS.

    From the machine hosting Spiceworks

    - Open a command prompt - Execute the following command line

    nslookup [IP ADDRESS] If this works, it must return the HOSTNAME

    - Now, we have to check the reverse : nslookup [MACHINE HOSTNAME] If this works, it must return the IP ADDRESS.

    If not, look out for DNS issues.

  • 33

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    4 4 4 4 Conf igurat ion Backup requires an SSH or Telnet AccountConf igurat ion Backup requires an SSH or Telnet AccountConf igurat ion Backup requires an SSH or Telnet AccountConf igurat ion Backup requires an SSH or Telnet Account

    To solve this issue, you have to create the appropriates SSH or Telnet accounts.

  • 34

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

  • 35

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    7 7 7 7 Connect ing Spiceworks data base thanks to ODBCConnect ing Spiceworks data base thanks to ODBCConnect ing Spiceworks data base thanks to ODBCConnect ing Spiceworks data base thanks to ODBC

    1 1 1 1 ---- IntroductionIntroductionIntroductionIntroduction

    The tutorial purpose is to find out how to connect the Spiceworks data base to excel

    Hey man, why would we do that ? You are aware that thanks to the report section in Spiceworks, you can build custom SQL requests and/or download some of them from the community report sharing page. If you want to export request results, you have a Spiceworks functionality to do this. However, each time you want to refresh them, you have to export the request again into Excel.

    ODBC allows you to execute and import directly SQL requests on the Spiceworks data base in Excel. Useful ?

    2 2 2 2 ---- What do we need ?What do we need ?What do we need ?What do we need ?

    1. Spiceworks (No way ?) 2. Excel 3. ODBC for SQLITE (http://www.ch-werner.de/sqliteodbc/) 4. Some SQL requests

    3 3 3 3 ---- Instal l and configure ODBC for SQLITEInstal l and configure ODBC for SQLITEInstal l and configure ODBC for SQLITEInstal l and configure ODBC for SQLITE

    Download ODBC from : http://www.ch-werner.de/sqliteodbc/ The direct link for the actual last release is http://www.ch-werner.de/sqliteodbc/sqliteodbc.exe. Once installed, you may want to go now to the control panel>administrative tools>ODBC and open what we are working for.

    You also can open ODBC in one shot with the run command odbcad32 if you are lazy :D.

    As you saw, my GUI is in French, Ill try to give you the best translation but I wont bet my life this will be good ones. What we need to do is to create a system data source. You can also create a user data source but this will be effective only on the

  • 36

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    user computer whereas the system source system will share with other allowed users the ODBC and requests. Once you have open ODBC, look for this :

    My ODBC for Spiceworks is already created but I will show you with a new one. Next add.. and chose SQLite3 ODBC Driver

    Fill the next windows as below :

  • 37

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    When looking for the spiceworks data base, click browse and go to ..\spiceworks\db\spiceworks_prod.db. Maybe, you will have to change the file extention to make the .db file to appear.

    Finally, this is what you get when all of this has been done :

  • 38

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    4 4 4 4 ---- Using ODBC with ExcelUsing ODBC with ExcelUsing ODBC with ExcelUsing ODBC with Excel

    I am going to show you how to create a sheet where you will add the SQL requests you want to execute. When this will be done, just save the sheet. Open it later, refresh to get the results =). Once Excel is opened, locate the DATA button then click on FROM ANOTHER SOURCES

    Click on MICROSOFT QUERY.

  • 39

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    If things did go straight, you must see appearing the Spiceworks v2 data base we created earlier. You can see Spiceworks v2 I created with you as well as Spiceworks, the one I actually use. Click OK.

    Microsoft Query will open, then choose file>Execute SQL.

    Copy/past the SQL Query you want to execute. You can use the queries I shared on my profile for the community if you want to.

  • 40

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    Now you can star at the result, pretty cool I think. But it is not over yet.

    I guess nobody wish to copy/paste each time the request to get the result, so I suggest you to save it. File>save as

  • 41

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    Close Microsoft Query or add another queries if you want to. Then go back to Excel>data>Existing Connections. If things did go straight, you must see queries you saved earlier. MY_REQUEST is selectable, so select it.

  • 42

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    When selected, Excel will ask you as below where you want to import data, so obviously you may want to use the first cell of the sheet. Then click OK.

    Here is the result :

    5 5 5 5 ---- ConclusionConclusionConclusionConclusion

    As a conclusion, just save your sheet or open a new sheet in your workbook to import more queries. From now on, just open your sheet, click on refresh and do what you have to with data. For MacroMen, VBA users I think you might find this a bit usefull.

  • 43

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    8 8 8 8 BULK IMPORTBULK IMPORTBULK IMPORTBULK IMPORT

    To import none scannable data into Spiceworks, it is possible to use the bulk import that allows you to import devices from a csv file.

    Step 1 : Make backup of the data base by going there : Settings -> Backup Configuration -> Back up Now. Step 2 : Go to ..\ Spiceworks\pkg\gems. Step 3 : Look for the the directory with the latest version like spiceworks-x.x.xxxx with x.x.xxxx the version of Spiceworks. Step 4 : Copy ..\ Spiceworks\pkg\gems\ spiceworks-x.x.xxxx\bulk_import.rb to C:\Program Files\Spiceworks\bin Step 5 : Open a cmd prompt and naviguate to ..\Spiceworks\bin.

    Execute this command line to be able to use the bulk_import.rb

    ruby bulk_import.rb -h Assuming you have a csv file, you are ready to perform a bulk import. Still, in the cmd prompt, you will have to call bulk_import.rb with the following options.

    -e email [email protected] -p password my_pwd -s server Spice-srv.domain.com -P Spiceworks port X -V Verbose More details while importing

    To import file.csv, the command line to execute is :

    If you are doing this from a remote computer

    Ruby Bulk_import.rb e [email protected] p my_pwd s spice-srv.domain.com P X V file.csv

    OR If your are doing this from the Spiceworks server

    Ruby Bulk_import.rb e [email protected] p my_pwdV file.csv How to create your csv file ?

    First, it must use the , separator and not ;. The first line of the csv must be the names of the rows of the devices table in the Spiceworks database. However you can choose what information you want to import. At least, you must specify the name of the device to import. It is the minimal. You shall know that if you have devices with equal names, then you must specify the at least the serial number of the devices. Else, the bulk import will failed because Spiceworks gives for serial number the name of the device if none specified. Thus, 2 devices can not have the same serial number if the name is the same. Make senses.

    Name item1 item1 item2

    It will fail.

    Name, serial_number item1,SN1 item1,SN2 item2,SN1

    It will work.

  • 44

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    There it is, the row names of the devices table you want to import into the Spiceworks database. DEVICES TABLE

    id

    name

    type

    description

    server_name

    domain

    manufacturer

    model

    os_serial_number

    windows_product_id

    serial_number

    ip_address

    mac_address

    operating_system

    version

    windows_user

    primary_owner_name

    memory

    management_oid

    last_boot_up_time

    service_pack_major_version

    service_pack_minor_version

    number_of_licensed_users

    number_of_processors

    processor_type

    created_on

    kernel

    page_count

    install_date

    device_type

    current_user

    bios_version

    location

    online_at

    offline_at

    asset_tag

    manually_added

    bios_date

    c_purchase_price

    c_purchase_date

    b_name

    b_device_type

    b_asset_tag

    b_manufacturer

    b_model

  • 45

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    b_primary_owner_name

    b_serial_number

    warning_alert_count

    error_alert_count

    open_ticket_count

    auto_tag

    user_tag

    exclude_tag

    last_scan_time

    spice_version

    vpro_level

    last_backup_time

    user_id

    user_primary

    swid

    product_categories

    domain_role

    b_description

    site_id

    remote_agent_id

    I want to pick some of the above row name for the following csv file. So the csv header will look like this :

    Name,device_type,manufacturer,model,mac_address,serial_number,ip_address

    Some fields can be blank, but as I said, name cant be blank and serial_number can be blank but should not be to avoid errors. Here are some examples of bulk import :

  • 46

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    I start a bulk import in the case im doing it froms the spiceworks server.

    Now I start a second bulk import like if I was doing it remotely :

  • 47

    SP

    ICE

    WO

    RK

    S |

    20

    /07

    /20

    12

    Here we are, data have been uploaded.