Curious if anyone has attempted to or successfully integrated Zabbix with ServiceNow. I'm specifically interested in Zabbix utilizing ServiceNow's CMDB, as ServiceNow is something we will be using soon, but Zabbix is something we are still looking into, but leaning heavily towards.
Ad Widget
Collapse
ServiceNow Integration?
Collapse
X
-
-
I am currently using a LLD through Service-now's API to create some monitors in zabbix (specifically SSL, and looking at URL Monitors)
I am accessing the ServiceNow web-service via python, here is a link to what you need.
Down the road, I am hoping to write up an agent script that will fire on auto registration to help apply templates but that's a bit off.
In addition (and though we will likely be moving this to a script in the near future), we have an e-mail integration between Zabbix and ServiceNow that updates CI's when they auto register through zabbix via a puppet install.
A third option for integration would be to utilize a database and the ServiceNow MID server for integration via SN's transform maps.
So there are lots of ways to do it, but it really depends on where your strength's are, and what you are trying to do.Comment
-
I'm using that python integration to create incidents on SN via WebService and it runs so good, fast and easy.
Please coreychristian can you explain how to connect SN with zabbix to use LLD?
As I understand with the SN discovery you trigger an automatic configuration into zabbix?
Thank you!
P.D. So happy to know people with zabbix and SN
Number of hosts 1600,Number of items +90k,Number of triggers +22k, Number of users +100, New values per second +1270
http://zabbixes.wordpress.com/Comment
-
I am not really using SN Discovery in any part of this, just the Zabbix LLD, and templates.
There is probably a more efficient way to do it, but I am both learning python and webservices so I have kind of been taking it slow. Since I am not really a developer, I figured I would leverage the LLD as it does a lot of what we need automatically in regards to removing old items, not creating duplicates, etc...
Well to start with, I track a lot of our monitoring stuff in service-now, so that parts a bit manual.
But in general we have two CI types that I am planning on using with LLD. SSL Certs and and URL's that we intend to monitor. Currently I only have the Cert one up and running, but I should be able to get something very similar working for http URL's we intend to monitor as well. Long term I want users to use the servicenow catalog to request SSL Cert and HTTP URL monitoring, and it will be completely hands off from out team.
Then I have a python script (below) that accesses the SNow webservices, pulls back the SSL Cert information we need to create the SSL Items and Triggers inside of zabbix.
Looks like the URL part will have to be on hold for now though, can't create web scenario's via LLD, just got around to looking at that part, hopefully it will be added in the near future.Code:#!/usr/bin/python # use the SOAPpy module from SOAPpy import SOAPProxy #Set Connection up username, password, instance = 'XXXXXXXX', 'XXXXXXXX', 'XXXXXXXXXXXX' proxy = 'https://%s:%s@%s.service-now.com/u_cmdb_ci_monitors.do?displayvalue=true&SOAP' % (username, password, instance) namespace = 'http://%s.service-now.com' % (instance) server = SOAPProxy(proxy,namespace) #retrieve records response = server.getRecords( __encoded_query = 'u_monitor_type=2^u_status=Online^u_monitor_location=1') #Print JSON Output for Zabbix LLD print ('{') print ('\t\"data\":[') i=1 for each in response: print ('\t\t{') if i < len(response): print ('\t\t\t"{#MONID}":"' + each.u_number + '",') print ('\t\t\t"{#RELATEDCI}":"' + each.u_related_ci + '",') print ('\t\t\t"{#CERTCN}":"' + each.u_certificate_cn + '",') print ('\t\t\t"{#CERTIP}":"' + each.u_cert_ip_address + '",') print ('\t\t\t"{#CERTPORT}":"' + each.u_cert_port + '",') print ('\t\t\t"{#CERTLOCATION}":"' + each.u_monitor_location + '",') print ('\t\t\t"{#MONSTATUS}":"' + each.u_status + '"},') i=i+1 else: print ('\t\t\t"{#MONID}":"' + each.u_number + '",') print ('\t\t\t"{#RELATEDCI}":"' + each.u_related_ci + '",') print ('\t\t\t"{#CERTCN}":"' + each.u_certificate_cn + '",') print ('\t\t\t"{#CERTIP}":"' + each.u_cert_ip_address + '",') print ('\t\t\t"{#CERTPORT}":"' + each.u_cert_port + '",') print ('\t\t\t"{#CERTLOCATION}":"' + each.u_monitor_location + '",') print ('\t\t\t"{#MONSTATUS}":"' + each.u_status + '"}]}') i=i+1Last edited by coreychristian; 12-03-2014, 21:27.Comment
-
This is great to see, Angel, and you made my evening with this information. Question(s) for you:
- Are you able to keep track of which incident ticket was created thru the integration and comment or acknowledge the alert?
- If an alert returns to normal service, are you able to automatically close the ticket?
- Can you update the tickets with notes via Zabbix (i.e. if you have, for example, a notification that goes out every 10 minutes saying that Device X is down) will it update that ticket saying that Device X is down or will it try opening a new ticket?
- What user account is being used to login to SN?
Sorry for inundating you with questions but this is just so great!
I'm using that python integration to create incidents on SN via WebService and it runs so good, fast and easy.
Please coreychristian can you explain how to connect SN with zabbix to use LLD?
As I understand with the SN discovery you trigger an automatic configuration into zabbix?
Thank you!
P.D. So happy to know people with zabbix and SN
Comment
-
Hello ToddM!
I will try to answer all your questions
Are you able to keep track of which incident ticket was created thru the integration and comment or acknowledge the alert?
When SN creates your instance, and adds a customize webservice, its possible to define the fields, in this way you can obtain the incidentid, for example, to track and comments the ticket.
If an alert returns to normal service, are you able to automatically close the ticket?
As the previous question, yes you can.
Can you update the tickets with notes via Zabbix (i.e. if you have, for example, a notification that goes out every 10 minutes saying that Device X is down) will it update that ticket saying that Device X is down or will it try opening a new ticket?
Yes, is possible too
What user account is being used to login to SN? the one that is defined on the webservice.
For further info you can read a lot of documentation on the wiki, for example the soap webservice Roles:
Role Description
soap Can perform all SOAP operations.
soap_create Can insert new records.
soap_delete Can delete existing records.
soap_ecc Can query, insert, and delete records on the Queues [ecc_queue] table.
soap_query Can query record information.
soap_query_update Can query record information and update records.
soap_script Can run scripts that specify a .do endpoint. This role is required for running Scripted Web Services.
soap_update Can update records.
You have a lot of information about different ways to manage tickets with the
Webservice here:
And one of the best API implementation for me:
Or
I find a whole world arround Zabbix and ServiceNow, is complicated to see the end on this
Number of hosts 1600,Number of items +90k,Number of triggers +22k, Number of users +100, New values per second +1270
http://zabbixes.wordpress.com/Comment
-
Spot on Angelhc.
Just wondering, have you had much of a chance to play around with the new ServiceNow Event Management with zabbix?
We didn't do much with Eureka ServiceNow, but I have been working with them on the FUJI release later this year, will hopefully mean some new pretty great options for integrating Zabbix Alerts with ServiceNow.Comment
-
Just thought I would toss an update here. We are now on the FUJI release of ServiceNow and testing the integration with zabbix and the event management using both the SNMP collector and WebServices python script.
Via SNMP our integration was rather easy (we were previously integrating via SNMP and Netcool), starting web services this week. I am hoping though long term we will be working with them to build a connector so we can utilize the best integration method.
The only bug I have run into so far is the alert rules processing order, other than that everything has been smooth. If any of you all are interested in regular updates or have any questions feel free to reach out to me.Comment
-
Corey,
I'd be very interested in getting updates on how your integration is going. We are on the cusp of integrating ServiceNow with Zabbix, as well.
LarryD
[email protected]Comment
-
Sure Larry, no problem.
As mentioned, we are currently integrating through netcool via a MSSQL table and transform maps, which has worked very well for us over the past 2 years or so.
So far things are going pretty well, we have tested both connecting to ServiceNow via the SNMP connector they created and their webservices API via a python script they provided.
SNMP seems to be a lot faster though it doesn't get as much information into the event fields as the webservices script.
The webservice script though seems to bog down the alerter process when enabled though, it spikes us from a steady 3% to an average in the 50's, I would guess just because SNMP is fire and forget where the python script doesn't exit until the event is actually created.
Depending on your config the web service script should be fine, we just have all of our alerts configured to send multiple messages so our alert actions/second is fairly high.
I will also be working with them over the coming months to try and build a zabbix connector which would probably be the most ideal way to integrate but requires the most development time.
Are you going to be at ServiceNow's Knowledge this year by chance? Would love to catch up with some people there using zabbix.Comment
-
Hey Larry, knowledge was really fun, a little limited on event management and monitoring companies/contractors this year, hope it will pick up next year though as all of the breakouts I went to for event management were pretty active. The one I presented at had about 150 people it seems, so there was at least a lot of interest in event management in ServiceNow.
Just for an update though, we have things pretty much done, but we are running into some performance problems, primarily due to sending multiple events per trigger, which ends up associating quite a large number of events to a single alert in the tool.
We are also settling on an SNMP integration for now as the web services just isn't quite fast enough (took about 1s to respond so pretty quick) and causes the Zabbix alerter process to use up more resources and eventually fall behind due to the single threaded nature of that process and the volume of our events.
I am still trying to work with them on building a connector (have service now check Zabbix for new alarms, rather then have Zabbix send the alarms in) which would hopefully alleviate any of the performance issues we are currently seeing.
I was pleasantly surprised though I must have ran into at least a dozen other people while I was there who also used Zabbix for monitoringComment
-
Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / VagrantComment
Comment