Jump to content

Steve G

Hornbill Developer
  • Posts

    748
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Steve G

  1. Hi @AndyGilly, I've made the required changes, the scripts now support the use of proxies. Each script now has a number of variables that can be used to define the proxy details. If set to NULL, then a proxy will not be used. They are on Github now. Let me know how you get on with them. Cheers, Steve
  2. Hi @nasimg, You could make a call to session::userProfileGet, passing the email address in the userId parameter as so: Note that the userId parameter is not case-sensitive in this API call, but the userId returned in the profileData output params is correctly cased. Cheers, Steve
  3. @AndyGilly I saw the screenshot before you removed it, and you can get to what you need fine so it's not a firewall issue. It'll likely be your proxy getting in the way, I'll make some changes to the code to allow you to provide proxy details, will let you know here once done. Cheers, Steve
  4. Hi @AndyGilly, Looks like it's timing out when trying to retrieve your instance API endpoint details from files.hornbill.com - possibly due to a firewall or proxy getting in the way... Does the account and machine that's running Power BI (and therefore R) have access to https://files.hornbill.com/instances/YOURINSTANCEID/zoneinfo, replacing YOURINSTANCEID with your instance ID? We may need to add specific proxy support to the scripts too, I'll take a look at that. Cheers, Steve
  5. Hi @AndyGilly, I've just given the R scripts a whirl through R v4.0.2, and they are working fine. The process I followed to install and configiure this is as so: Downloaded and installed R v4.0.2 from here: https://cran.r-project.org/bin/windows/base/ ; Opened RGui for the newly installed version of R, and installed the httr & readr packages (and dependencies) from within there (I used the UK - London repo, but that shouldn't matter as they are mirrored); Opened Power BI, navigated to Options and settings > Options > R scripting, and set the Detected R home directories option to the version of R that I just installed: Run the existing scripts as a Power BI data source, and they return the dataframe as expected. So I think this must be an environmental issue in your R/Packages/Power BI configuration... Could you check the above steps (2 and 3 probably being the most important) and let me know how you get on? Also, if you don't want to use R to pull data in to Power BI from Hornbill, then you could always use the (slightly friendlier) Python data source scripts to perform this. Cheers, Steve
  6. Hi @Adrian Simpkins, No, the IT Service Management Connector in Azure currently does not support Hornbill - but there's no reason why you couldn't use a combination of Azure Monitor, Azure Automation and the PowerShell Runbooks and Modules that we have provided (and are available from the PowerShell Gallery, or from the Runbooks and Modules galleries in Azure Automation) to perform the same functionality... You could (and this is VERY high level) add a Runbook to Azure Automation that takes relevant inputs and makes a call to the Hornbill API to log an incident (examples), then configure your alerts in Azure Monitor to call that Runbook when the thresholds are breached. It's been a while since I set up Azure to do that, but from what I remember it was fairly straight forward... I'll add a task to our list to investigate what needs to happen to become a supported tool in the Azure IT Service Management Connector, but the above should get you going in the meantime. Let me know how you get on. Cheers, Steve
  7. Hi @chriscorcoran, The only ways I can replicate this error are: If the channel is only allowed to be posted to by moderators, and the user who you created the keysafe key with is not a moderator (usually Team Managers); If the user who you created the keysafe key with is not a member of the Team. So I think it must be one of those scenarios? Forbidden would suggest a permissions issue, so I would check for either of the above... Cheers, Steve
  8. What's Fixed Cloud Automations for Jira and Jira Cloud - fixed errors when creating Issues without Versions being provided.
  9. What's New Cloud Automations for GOV.UK Notify - Send and check the status of SMS messages, letters and emails via the GOV.UK Notify service. See the Hornbill wiki for more information.
  10. Hi @Mark den Elzen, The 404 error you are seeing suggests that the script has been able to communicate with Hornbill, but can't find the specific endpoint. This is possibly down to the instance ID provided to the script - could you double-check that please (and note, it is case-sensitive). Thanks, Steve
  11. @Martyn Houghton, I'll add it to the list and let you know once we've had chance to take a look. Cheers, Steve
  12. We've just released a new package to the ITOM Package Library: Windows Management The package contains the following operations that can be performed against your Windows targets: Services - Start Services - Stop Services - Restart Services - Get Services - Startup Disabled Services - Startup Manual Services - Startup Automatic Environment Variable - Get Environment Variable - Set Environment Variable - Delete Process - Get Process - End Process - Start Set Execution Policy The package is available to install from the Package Library now, and you can find more details about this package on the Hornbill Wiki. If you have any questions, or suggestions of additional operations for this package, then please let us know here. Thanks, Steve
  13. What's New ITOM Content Pack - Windows Management package. A collection of automation tasks for managing Services, Processes, Environment Variables and PowerShell Script Execution Policies on Windows machines. See the Hornbill Wiki for more information.
  14. Hi @AndyGilly, This can be done using the Hornbill API. An example in Postman: Where the URL is built using the Endpoint field from the About modal in the Admin console, followed by the service (automation) and the method (runbookRun): The request is authenticated using a Hornbill API Key in the request headers: And the body is JSON, and made up of the service, method and params, including the Runbook Name (the Process ID from the Runbok settings), and an array containing the input params as defined in your Runbook settings: { "methodCall":{ "@service":"automation", "@method":"runbookRun", "params": { "name":"add-ram-to-vm", "inputParam":[ { "name":"VMName", "value":"DEV-A-WRK-10-64" }, { "name":"SetRAM", "value":"1.5GB" } ] } } } The API is documented here: https://api.hornbill.com/automation/?op=runbookRun Let me know if you need any more information regarding this! Cheers, Steve
  15. Hi @Will J Douglas, The current Teams integration doesn't support adding mentions. That particular feature was not added as there's no nice way of doing it due to complications in the API that Microsoft provide to perform this task - it's not as straightforward as @ mentioning someone I'm afraid. With your requirement, would the mentions be hard-coded into the body input parameter? So they wouldn't be dynamic and driven by a field in the Request? If so, then we may be able to provide something like the attached, and give you an additional input parameter for you to define the IDs for the users you are mentioning in 1 & 2: It's not an elegant solution, but probably the best we could do while we wait for Microsoft to push the API out of beta, hopefully with better support for mentions... Thanks, Steve
  16. What's New Cloud Automations for SalesForce - Create, Read, Update and Delete SalesForce Contracts.
  17. Hi @Martyn Houghton, The Hornbill Python API Library has been updated on Github to support complex input parameters. Here's an example of its use: from xmlmc import XmlmcService from xmlmc import XmlmcHelper xmlmc = XmlmcService("yourinstanceid") xmlmc.set_api_key("yourapikey") xmlmc.add_param("application", "com.hornbill.servicemanager") xmlmc.add_param("entity", "Requests") elem = xmlmc.add_param("primaryEntityData") childElem = elem.add_child("record") childElem.add_child("h_pk_reference", "IN00013316") childElem.add_child("h_summary", "This is the summary, as set by my Python script") json_string = xmlmc.invoke("data", "entityUpdateRecord") if XmlmcHelper.is_call_success(json_string): auditTransactionId = XmlmcHelper.get_param_value(json_string, "params/auditTransactionId") print(auditTransactionId) else: print(XmlmcHelper.get_error_message(json_string)) Cheers, Steve
  18. Hi @Martyn Houghton, I've just had a look at the Python API Library, and it appears that it doesn't support complex parameters - which makes it pretty useless I'll add a re-write of that to the list, but for the time being I've knocked up a very basic example of how you can call that API in Python without the XMLMC module (or indeed XML at all), using a small function to make the call using the requests module: # entityUpdateRecord.py # This script is an example of how to call a Hornbill API in Python import requests import sys apiKey = 'apikey' # This is the (case sensitive) API key to use to authenticate the API calls against the Hornbill instance instanceId = 'instanceid' # This is the (case sensitive) ID of your Hornbill instance # Get API endpoint from the instanceId URL = 'https://files.hornbill.com/instances/{instanceId}/zoneinfo'.format(instanceId=instanceId) try: endpoint = requests.get(url = URL).json()["zoneinfo"]["endpoint"] except requests.exceptions.RequestException as e: sys.exit('Unexpected response when attempting to retrieve Hornbill Zone Information: ' + e) # Define a function to make API calls def invokeXmlmc(service, method, params): xmlmcEndpoint = endpoint + "xmlmc/{service}/?method={method}" URL = xmlmcEndpoint.format(service=service, method=method) headers = { 'Content-type': 'application/json', 'Accept': 'application/json', 'Authorization': 'ESP-APIKEY ' + apiKey } data = { 'methodCall':{ '@service':service, '@method':method, 'params':params } } try: response = requests.post(url=URL, json=data, headers=headers) if 200 >= response.status_code <= 299: return response.json() else: return { '@status': False, 'state': { 'error': 'Unexpected status returned from call to {service}::{method}: {statusCode}'.format(service=service, method=method, statusCode=response.status_code) } } except requests.exceptions.RequestException as e: return { '@status': False, 'state': { 'error': 'Unexpected response from call to {service}::{method}: {errorString}'.format(service=service, method=method, errorString=e) } } # Build API Params object in JSON paramsJson = { 'application': 'com.hornbill.servicemanager', 'entity': 'Requests', 'primaryEntityData': { 'record': { 'h_pk_reference': 'IN00013316', 'h_summary': 'This is the summary, as set by my Python script' } } } # Make API Call apiResponse = invokeXmlmc('data', 'entityUpdateRecord', paramsJson) if apiResponse['@status'] != True: sys.exit(apiResponse['state']['error']) # Print the response to show it worked print(apiResponse) Hope that helps, let me know if you need any of it explaining. Cheers, Steve
  19. Whats New Cloud Automation Integration for SolarWinds Service Desk. Create, Update, Read or Comment On Changes, Incidents and Problems within SolarWinds Service Desk instances. See the Hornbill wiki for more information.
  20. HI @Steven Cotterell, I've given this a whirl and am struggling to replicate your issue Could you export and send me your workflow definition, and I'll see if I can spot what's going on... Thanks, Steve
  21. Hi @Jamie Talbot, This error would generally mean the Google Drive token in the keysafe key does not have permissions to talk to the APIs required to read the list of spreadsheets. There should be a more descriptive error message in the browser console, if you press F12 in your browser you will be taken to the console to check the actual error. Thanks, Steve
  22. HI @Jamie Talbot, If you want to create a new row in a Google Sheets spreadsheet, you should use the Append integration, as the Update integration is for updating existing rows in a sheet. For your use case, the Update node, and Cell Data parameter, should be configured as so, where the first Cell Value contains the request reference, and the second Cell Value contains the request summary. Let me know if you need any more information. Thanks, Steve
  23. Hi @AndyGilly, The latest update had no customer-facing release notes, hence the lack of announcement, but the changes were basically around PowerShell version validation and improved output messages when exceptions occur. Thanks, Steve
  24. Hi @Giuseppe Iannacone, Sure, if you send your log and config file to me I'll give them a once-over. I'll send you my email address in a personal message. Thanks, Steve
  25. Hi @Giuseppe Iannacone, The code that works out if there's an asset to update hasn't actually changed... I've just tested it to be sure and it's finding and updating records as expected: Is there anything useful in the import log to tell us what's happening? Are you sure the serial numbers in the asset records in Hornbill match those in the source data? Thanks, Steve
×
×
  • Create New...