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
欢迎关注微信公众号,留言交流;也欢迎使用我开发的微信小程序。

相关文章:

翻译: