snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.89k stars 3.14k forks source link

How to automate Snipe-it? #6797

Closed SavageSquirrel closed 5 years ago

SavageSquirrel commented 5 years ago

Server (please complete the following information):

Is your feature request related to a problem? Please describe.

We have thousands of data entry for the fields in our Snipe-it inventory system, and that is far too time consuming. We are IT support company for other companies, and this is a good free software, but it is too time consuming.

Describe the solution you'd like We need as much automation of inventory updating as possible. Does anybody know if someone has created a feature that can add more automation of new data into Snipe-it? We are looking to have an inventory software such as Snipe-it receive and display data from hundreds of desktop computers automatically, with all the data points updating into Snipe-it. Example: An office worker's desktop computer is upgraded from Windows 7 to Windows 10, and later in the day, that computer communicates somehow with Snipe-it, and tells it that it is now a Windows 10 computer.

Describe alternatives you've considered Is there a software that can automatically send computer desktop system information, for example in a CSV file, to a plug-in or add-on for Snipe-it? Thank you!

We have also considered Switching to Spiceworks, as they have an inventory management system, and a ticketing system, but our business owner does not want to switch to that system, perhaps because it would cost him money.

Additional context I am a new Snipe-it user, but I do have a degree in computers, so I am good with software, but new to this one. Please let me know if there is any way I can improve our situation, to get things moving, you will be of so much help, thank you!

EarlRamirez commented 5 years ago

I know there are a few in the community that will be able to shed some light here for you, for sure there is a posweshell script that works with AD

SavageSquirrel commented 5 years ago

:D

EarlRamirez commented 5 years ago

@SavageSquirrel check out https://github.com/snazy2000/SnipeitPS @snazy2000 is the man behind this.

GitHub
snazy2000/SnipeitPS
Powershell API Wrapper for Snipe-it. Contribute to snazy2000/SnipeitPS development by creating an account on GitHub.
andrefecto commented 5 years ago

I am working on a PowerShell script that will sync AD information to Snipe-IT but not from End User to Snipe-IT. (cannot guarantee if or when this will be open source...) The PS Module that @EarlRamirez linked to would require you to upgrade your PS version on all endpoints to v5+ or to also install the PowerShellGet on all older machines. (This means anything older than Windows 10 needs an upgrade or dependency install.) Also, running a script like this on endpoints would expose your local API key which probably isn't the best idea.

There could be ways around this by having a script on each machine write a flat file that a then secure server picks up and uses the API to import but this would be a lot of orchestrating for just some attributes but if you're willing then go for it!

You could also try having a script run on a secure server that remotely connects to every machine for its information, (see here) but your network administrators may not allow this and could be resource intensive depending on your total amount of endpoints.

Lastly, all of those methods bypass just using actual Active Directory lookups, which is what I am in the middle of doing. This also depends on what information you're actually getting and storing with Active Directory. You should also note that in Active Directory the "Operating System" field is ONLY updated when the computer is rebound to AD. So if you re-image a Windows 7 machine to Windows 10 in place and it doesn't change names/get rebound, then the OS field in AD will still say Windows 7.

With all this said if you have any experience with programming, picking up Powershell is very intuitive, very well documented, and a great skill if you have the time! Please let me know if you have any questions, I'll be happy to answer as best I can!

SavageSquirrel commented 5 years ago

Thank you for your advice.

ReignSol commented 5 years ago

https://github.com/ReignSol/snipeit-powershell

GitHub
ReignSol/snipeit-powershell
Snipe IT Asset automation with PowerShell Scripts. Contribute to ReignSol/snipeit-powershell development by creating an account on GitHub.
bricelabelle commented 5 years ago

We do this with the Snipe API. Simply run a script on your client computers using your current management tools that gathers the data you want and then sends it to Snipe using a curl command. Curl is not native on windows but you can just put the curl binary on your machines or even run curl from a network path as well. We have our machines send info to snipe daily this way, which is especially effective with custom fields in Snipe. I should also mention that we do this all using batch scripts on windows without the need for PowerShell or installing modules. On Macs, curl is native and we don't have to install anything there either.

As far as syncing AD, we have a script running on the Snipe IT server that uses the API to get a list of all users in snipe, queries AD using the ldapsearch (if using a linux server) for each user , then writes the data we want to a CSV file. Then it runs a command to import that CSV file so it's all automated and we get the fields we want.

stale[bot] commented 5 years ago

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.

CireB1925 commented 4 years ago

We do this with the Snipe API. Simply run a script on your client computers using your current management tools that gathers the data you want and then sends it to Snipe using a curl command. Curl is not native on windows but you can just put the curl binary on your machines or even run curl from a network path as well. We have our machines send info to snipe daily this way, which is especially effective with custom fields in Snipe. I should also mention that we do this all using batch scripts on windows without the need for PowerShell or installing modules. On Macs, curl is native and we don't have to install anything there either.

As far as syncing AD, we have a script running on the Snipe IT server that uses the API to get a list of all users in snipe, queries AD using the ldapsearch (if using a linux server) for each user , then writes the data we want to a CSV file. Then it runs a command to import that CSV file so it's all automated and we get the fields we want.


hi @bricelabelle , this is exactly what I wanna achieve, but I dont know how to use the api and how to use it as a script on the host. can you pls. guide me on the steps. thank you so much

CireB1925 commented 4 years ago

Server (please complete the following information):

  • Snipe- unknown version
  • OS: Windows and/or CentOS
  • Web Server:
  • PHP Version

Is your feature request related to a problem? Please describe.

We have thousands of data entry for the fields in our Snipe-it inventory system, and that is far too time consuming. We are IT support company for other companies, and this is a good free software, but it is too time consuming.

Describe the solution you'd like We need as much automation of inventory updating as possible. Does anybody know if someone has created a feature that can add more automation of new data into Snipe-it? We are looking to have an inventory software such as Snipe-it receive and display data from hundreds of desktop computers automatically, with all the data points updating into Snipe-it. Example: An office worker's desktop computer is upgraded from Windows 7 to Windows 10, and later in the day, that computer communicates somehow with Snipe-it, and tells it that it is now a Windows 10 computer.

Describe alternatives you've considered Is there a software that can automatically send computer desktop system information, for example in a CSV file, to a plug-in or add-on for Snipe-it? Thank you!

We have also considered Switching to Spiceworks, as they have an inventory management system, and a ticketing system, but our business owner does not want to switch to that system, perhaps because it would cost him money.

Additional context I am a new Snipe-it user, but I do have a degree in computers, so I am good with software, but new to this one. Please let me know if there is any way I can improve our situation, to get things moving, you will be of so much help, thank you!


hi @SavageSquirrel .. have you found a solution ?? thanks

jgerle commented 3 years ago

There is a rather basic open source Windows Agent available: https://github.com/Scope-IT/marksman. Maybe you can take it from there?

GitHub
Scope-IT/marksman
Windows agent for Snipe-IT asset management system - Scope-IT/marksman
javiercivica commented 3 years ago

Hay un Agente de Windows de código abierto bastante básico disponible: https://github.com/Scope-IT/marksman . ¿Quizás puedas tomarlo desde allí?

GitHubAlcance-IT / tiradorAgente de Windows para el sistema de gestión de activos Snipe-IT - Scope-IT / marksman

No funciona en las últimas versiones

GitHub
Scope-IT/marksman
Windows agent for Snipe-IT asset management system - Scope-IT/marksman
jmatec commented 2 years ago

We do this with the Snipe API. Simply run a script on your client computers using your current management tools that gathers the data you want and then sends it to Snipe using a curl command. Curl is not native on windows but you can just put the curl binary on your machines or even run curl from a network path as well. We have our machines send info to snipe daily this way, which is especially effective with custom fields in Snipe. I should also mention that we do this all using batch scripts on windows without the need for PowerShell or installing modules. On Macs, curl is native and we don't have to install anything there either.

As far as syncing AD, we have a script running on the Snipe IT server that uses the API to get a list of all users in snipe, queries AD using the ldapsearch (if using a linux server) for each user , then writes the data we want to a CSV file. Then it runs a command to import that CSV file so it's all automated and we get the fields we want.

Hi there! Sorry for bothering you. I am trying to automate Snipe IT like this but I am having some trouble finding out how will I auto-update the assets. Can you please help me? Thanks in advance!

aadrsh commented 1 year ago

Hi, please check https://github.com/aadrsh/snipe-it-python-agent i have used this method( deploying python exe on smb and running that from task scheduler) to automatically create assets along with their details in snipe it, but you can customize it a little bit according to your needs.

GitHub
GitHub - aadrsh/snipe-it-python-agent: Python script that can be used as snipe-it asset scanning agent
Python script that can be used as snipe-it asset scanning agent - GitHub - aadrsh/snipe-it-python-agent: Python script that can be used as snipe-it asset scanning agent
Patrick20240 commented 8 months ago

Hey hey :) just wanted to ask if it is possible with any of the posted answers to automate Users and licenses. We are a small MSP and i want to have a documentation about licenses from our customers. So it´s important to get the data from and to multiple Companys. It´s only for our own documentation and billing department. End users dont get access to snipeIT.

i see now: Agent AzureAD API (?) Python Script Automate csv files? (Import Users, import licences, deleting users also possible via csv?)

When i would have the csv files from snipe-it i could automate a import job? Syncing users and licenses via CSV? And i want also so sync a list from our license supplier. I can get a csv file with all Licenses we bought for our customers. Is it possible to sync this also?

Users, users licenses And all global licenses from our supplier. So finally i want to have all licenses available, and licenses checked out to the users :)

Thank you so much for any hint. SnipeIT would be perfect :)

aadrsh commented 7 months ago

Hey hey :) just wanted to ask if it is possible with any of the posted answers to automate Users and licenses.

You can use the python script I've tried it but in a way I was aiming to save all software list of a PC in Snipe IT. Do you have any way you can identify which PC has the license ? by any api or powershell script or by any command? you can pipe the output of that command in python and use the api as is, and register the license to the user.