Coder Social home page Coder Social logo

snipeagent's People

Contributors

reticentrobot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

snipeagent's Issues

SnipeIT - Hosted enviornment

Will this agent function with the cloud hosted version of the SnipeIT application versus the self hosted, on site enviornment?

Runs with no errors but not updated in SNIPEIT

When I check dashboard, or asset, it is not updated. However, when I look at output, there are not errors:

HTTP 200: Connection to Snipe-IT instance succeded.
Attempting to create type: SnipeSharp.Endpoints.Models.Manufacturer
Instance name: ********
Already exists in DB
Attempting to create type: SnipeSharp.Endpoints.Models.Category
Instance name: Desktop
Already exists in DB
Attempting to create type: SnipeSharp.Endpoints.Models.Model
Instance name: **********
Already exists in DB
Attempting to create type: SnipeSharp.Endpoints.Models.Company
Instance name: ************
Already exists in DB
Attempting to create type: SnipeSharp.Endpoints.Models.StatusLabel
Instance name: in production
Already exists in DB
Attempting to create type: SnipeSharp.Endpoints.Models.Location
Instance name: **********
Already exists in DB
Asset already exists in db. Checking for consistency.
Changes in asset detected. Updating:
Total program execution time 1334ms.
3/31/2022 12:05:31 PM: Exiting application.

unhandled expectation

Kindly help on the below error.
ERROR

Note: I am not developer & I am support engineer in desktop support. I am just trying to test this agent before deploying the environment. So can u pls brief how this agent will sync with our DB... Step by step if possible

OU Level in Config

Can anybody provide me with a bit of clarification/documentation about how the OU setting work in the config. I'm trying to debug an issue where the Location is being reported from a child OU rather than the parent. I've got the following (see below) set as part of my config but i'm unclear if the 'OULevel key' needs to be changed or if there's something else causing this odd location issue.

Warranty Lookup - based on vendor API?

It would be handy that devices would be added with their correct warranty period.
There are several API's available for this part. Maybe a good idea to include it in the agent?

E.g.:
Dell: https://techdirect.dell.com/portal/AboutAPIs.aspx
HP: https://developers.hp.com/hp-client-management/doc/device-warranty
Lenovo: http://supportapi.lenovo.com/Documentation/Index.html
Cisco: https://developer.cisco.com/docs/support-apis/#!serial-number-to-information/cisco-serial-number-to-information-api-reference

See also #snipe/snipe-it#7326

Personally I would be helped with the HP warranty check, but other users might benefit from other.

FileNotFound exception upon running SnipeAgent.exe

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'SnipeSharp, Version=0.3.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at SnipeAgent.SnipeAgent.Main(String[] args)

The above exception is thrown when I try to run the exe after editing the config file as instructed.

[FEATURE REQUEST] Silent Mode

Hello!

I have been installing this into the PC's where I work, and the agent runs at every boot to pick up on any changes that may be present. But when it runs at boot, a CMD window pops up, and when a user logs on, that may scare them, or they may thing the PC is broken. Is there any way to hide this so it will still run, but not show? Preferably this would be a setting in the config, since the "run at boot" registry key that is set will just execute the EXE without any parameters.

Problem white Location and other key to the Snipeagent.exe.config

Hey Guys,
so the Agent its Working but the problem is.

When I get the data

Adjust as soon as you are in SnipeIt. The agent is no longer running. If I take a standard status, the agent runs. The location and company will not be confiscated either. Do you have an idea here?

Greetings City

Update Function not functioning

I think SharpSnipe has a problem with it's .update feature.

SnipeAgent creates assets fine via the SharpSnipe lib, but the update asset seems to fail.

I've got a custom app that uses the update method and it's not working as well.

Any ideas, finding it hard to debug where it's going wrong.

Unhandled Exception

HI,

I have been running this agent fine for months then all of a sudden today we are getting the unhandled exception below, I'm not sure if its due to the latest .net update that happened but this is happening on multiple computers running Windows 10 with SnipeIT Version 5.1.5.

Unhandled Exception: SnipeSharp.Exceptions.InvalidStatusLabelTypeException: Deployed Is an invalid status label. Use undeployable, deployable, pending, archived, in production, ready to deploy
at SnipeSharp.Endpoints.Models.StatusLabel.set_Type(String value) in C:\Users\mccrory\Source\SnipeSharp\SnipeSharp\Endpoints\Models\StatusLabel.cs:line 36
at SnipeSharp.Endpoints.Models.StatusLabel..ctor(String name) in C:\Users\mccrory\Source\SnipeSharp\SnipeSharp\Endpoints\Models\StatusLabel.cs:line 13
at Void .ctor(System.String)(Object[] )
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at SnipeSharp.Endpoints.ExtendedManagers.AssetEndpointManager.FindBySerial(String serial) in C:\Users\mccrory\Source\SnipeSharp\SnipeSharp\Endpoints\ExtendedManagers\AssetEndpointManager.cs:line 35
at SnipeAgent.Broker.SyncAll(SnipeItApi snipe, Asset currentAsset, Model currentModel, Manufacturer currentManufacturer, Category currentCategory, Company currentCompany, StatusLabel currentStatusLabel, Location currentLocation) in C:\Users\mccrory\Source\SnipeAgent\Broker.cs:line 194
at SnipeAgent.SnipeAgent.Main(String[] args) in C:\Users\mccrory\Source\SnipeAgent\SnipeAgent.cs:line 354

SnipeAgent - How to import user's Hardware components and licenses as well

Dear team,

First of all. Excelent work with this Agent.
It worked just fine.

Now. I do have an inquiry.
I kinda need, not only the client's notebook info slide ( wich loads the Manufacturer, Category, model and so forth ) info into my snipe-it, but also it's hardware components (Disks, RAM cards, Processor) and the user's current licenses (This one could be optional tho).

This is mandatory for me and my team, 'cause we're gonna have to deploy this agent all through the organization.

I understand this is all opensource and I can dive in and get into the import config.
Still. A guideline from you would help me out big.

Please advice. I remain attentive.
Best regards,
Ordnasil

Series of JSON errors when attempting to run

Unhandled Exception: SnipeSharp.Exceptions.InvalidStatusLabelTypeException: In Stock / Storage Is an invalid status label. Use undeployable, deployable, pending, archived, in production, ready to deploy
at SnipeSharp.Endpoints.Models.StatusLabel.set_Type(String value) in C:\Users\mccrory\Source\SnipeSharp\SnipeSharp\Endpoints\Models\StatusLabel.cs:line 36
at SnipeSharp.Endpoints.Models.StatusLabel..ctor(String name) in C:\Users\mccrory\Source\SnipeSharp\SnipeSharp\Endpoints\Models\StatusLabel.cs:line 13
at Void .ctor(System.String)(Object[] )
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at SnipeSharp.Endpoints.ExtendedManagers.AssetEndpointManager.FindBySerial(String serial) in C:\Users\mccrory\Source\SnipeSharp\SnipeSharp\Endpoints\ExtendedManagers\AssetEndpointManager.cs:line 35
at SnipeAgent.Broker.SyncAll(SnipeItApi snipe, Asset currentAsset, Model currentModel, Manufacturer currentManufacturer, Category currentCategory, Company currentCompany, StatusLabel currentStatusLabel, Location currentLocation) in C:\Users\mccrory\Source\SnipeAgent\Broker.cs:line 194
at SnipeAgent.SnipeAgent.Main(String[] args) in C:\Users\mccrory\Source\SnipeAgent\SnipeAgent.cs:line 354

Received this error after installing agent, copying over known working config file, and then triggering the agent.exe via PSEXEC remotely.

Adding more values like cpu/ram/os

Hey I just discovered this project after having a hard with marksman.

Would it be possible to add some custom values to the import?
Best regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.