Snipe it資產導入

上週介紹了Snipe it資產管理平臺的安裝,光體驗官方demo肯定不夠。現實場景中,是要真刀真槍管理各種資產的。

假設公司之前規模很小,是使用Excel表格類的工具管理各種資產,或者公司原來有個系統可選擇導出資產,那就恭喜你了。Snipe it可以通過CSV文件導入資產、配件、許可證、組件、消耗品和用戶。

下面以資產導入爲例。英文好的可直接查看官方文檔,信我一回,我寫這個文章的時候,中文世界沒有相關介紹,又填補了一個空白^_^。

拿到資產清單Excel表格,首先你要更改表頭,使其符合Snipe的要求(猜想就是Snipe it的mysql的相關表的字段)。

1. csv格式文件準備

基礎表頭項:

也就是通用的基礎信息,各種財產都有的屬性。

表頭名示例數據是否必須備註解釋
Item Name蘋果手機資產名稱
Company太平洋娛樂集團公司名稱
Category移動設備分類
Location北京位置
Purchase Date1999-10-1購買日期
Purchase Cost8888購買價格

資產特有項:

這個內容太多了,挑重要的解釋

表頭名示例數據是否必須備註解釋
Full Name孫悟空全名
Emailsunwukong@xxx.com郵箱
Usernamesunwukong用戶名
Model NameMBP Retina 13-inch個人理解是小一級的分類
ManufacturerApple製造商
Model NumberMacbookPro12,1不知道怎麼翻譯
SerialC20095805496869045H6序列號
Asset TagKJH90890資產標籤?
Notes一個不錯的機備註
Imagexxx.jpg圖片
StatusReady to Deploy資產狀態
Warranty months15保修期(月)
Checkout Typeuser借出類型
Checkout Location上海借出位置
Order NumberPO-007訂單號?
Supplier京西數碼屋供應商

還不太明白的可以下載官方示例csv:

Sample asset import CSV

把別人給你的Excel表格的表頭改成上述要求的表頭名,另存爲csv格式的文件待用。

2. 導入csv文件

登錄Snipe it系統,按下圖所示操作:

  • 上傳文件

asset import

  • 修改覈對相關信息

這一步操作最重要,千萬不要搞混了,不然數據亂了。

asset check

asset field

覈對無誤後提交,系統會自動錄入相關資產,如中間報錯,請根據頁面提示改正。

導入的過程中系統到底做了什麼呢?官方解釋,懶得翻譯了。

What It Does

When you execute this command with a valid path to your CSV, the importer will:

  • Split the user's name, creating firstname and lastname.
  • If not user is provided, it assumes the asset is Ready to Deploy.
  • If a user's name is provided, it assumes that asset is assigned to them
  • If a user's name is provided but no email is provided, it will generate an email address using your domain and the pattern you specified in email_format
  • Generate a password for the new user if a user's name is provided
  • Create the user if they don't exist (based on their email address)
  • Determine if the asset model exists based on Asset Model Name and Model Number combination
  • Create the asset models, locations, category, etc if they don't currently exist, skip them if they do.
  • If no user is provided, the asset gets created as ready to deploy instead of checked out to a user

實際操作難點就2個地方,一是理解哪些信息是核心項,二是根據系統要求不斷修改對應項,直到能順利導入,最終體驗還不錯,反正我是愉快錄入成功了。

有必要關注下系統怎麼創建用戶的的:

Make sure you have your organization's domain name, email format and username format set in Admin > Settings, so that it knows what domain to use when generating email addresses and usernames if none are provided in your CSV.

系統設置裏的選項,並不符合中文用戶的習慣,可以錄入後統一修改,或者有ldap類的系統對接,在csv文件裏面先修改好。

另外,看改動記錄,導入是先錄入資產,再自動執行分配到人的操作。

最後修改於: Friday, January 16, 2026
欢迎关注微信公众号,留言交流;也欢迎使用我开发的微信小程序。

相關文章:

翻譯: