Outbound connector - Update TicketID and Acknowledge alert.

I´m trying to make an outbound collector, to forward alert to our EMS.
But im wondering, when i forward an alert to the connector, the connectorstatus still says pending, even after AcknowledgeMonitoringAlerts.
This means that the alert is being re-sent to the connector over and over.
Why is this?
I am also trying to add a ticketID to the alert, this works as it should, but again the alert is getting retransmitted.
Kind Regards,
Michael
Code:
using System;
using Microsoft.EnterpriseManagement;
using Microsoft.EnterpriseManagement.ConnectorFramework;
using Microsoft.EnterpriseManagement.Common;
using System.Collections.ObjectModel;
using System.Threading;
namespace OutboundConnector
class Program
static void Main(string[] args)
ManagementGroup mg = new ManagementGroup("localhost");
ConnectorFrameworkAdministration cfAdmin = mg.GetConnectorFrameworkAdministration();
Guid connectorGuid = new Guid("{6A1F8C0E-B8F1-4147-8C9B-5A2F98F10003}"); // Or create/use your own Guid.
MonitoringConnector connector;
try
if (args.Length == 1)
if (args[0] == "InstallConnector")
ConnectorInfo info = new ConnectorInfo();
info.Description = "Connector";
info.DisplayName = "Create Case";
info.Name = "CaseCreator 1.0";
connector = cfAdmin.Setup(info, connectorGuid);
connector.Initialize();
Console.WriteLine("Created {0} with ID: {1}", connector.Name, connector.Id);
else if (args[0] == "UninstallConnector")
connector = cfAdmin.GetMonitoringConnector(connectorGuid);
ReadOnlyCollection<MonitoringConnectorSubscription> subscriptions;
subscriptions = cfAdmin.GetConnectorSubscriptions();
foreach (MonitoringConnectorSubscription subscription in subscriptions)
if (subscription.MonitoringConnectorId == connectorGuid)
cfAdmin.DeleteConnectorSubscription(subscription);
connector.Uninitialize();
cfAdmin.Cleanup(connector);
Console.WriteLine("Connector removed.");
return;
connector = cfAdmin.GetMonitoringConnector(connectorGuid);
while (true)
ReadOnlyCollection<ConnectorMonitoringAlert> alerts;
alerts = connector.GetMonitoringAlerts();
if (alerts.Count > 0)
connector.AcknowledgeMonitoringAlerts(alerts);
int i = 1;
foreach (ConnectorMonitoringAlert alert in alerts)
// Here you can send the alert to the other management system.
Console.WriteLine("#{0} Alert received on {1}", i.ToString(), DateTime.Now);
Console.WriteLine(">> Id: {0}", alert.Id.ToString());
Console.WriteLine(">> ConnectorStatus: {0}", alert.ConnectorStatus.ToString());
if (!string.IsNullOrEmpty(alert.TicketId))
Console.WriteLine(">> TicketId: {0}", alert.TicketId.ToString());
if (!string.IsNullOrEmpty(alert.ResolvedBy))
Console.WriteLine(">> ResolvedBy: {0}", alert.ResolvedBy.ToString());
Console.WriteLine(">> LastModified: {0}", alert.LastModified.ToString());
Console.WriteLine(">> LastModifiedByNonConnector: {0}", alert.LastModifiedByNonConnector.ToString());
Console.WriteLine(">> Description: {0}", alert.Description);
Console.WriteLine("");
i = i + 1;
if (string.IsNullOrEmpty(alert.TicketId))
alert.TicketId = "42";
alert.Update("Update String");
//Wait for 30 sec before checking for new alerts again.
Console.WriteLine("Sleeping for 30 seconds...");
Thread.Sleep(10 * 1000);
catch (MonitoringException error)
Console.WriteLine(error.Message);

even though this is a VERY old question, i still stumbled upon it when experiencing the same problems.
After another search i found this: http://microsoft.public.opsmgr.sdk.narkive.com/cUIlBbn1/outbound-connector-alert-keeps-reappearing
It explains the problem:
The reason you keep getting the alert is because you are changing them.
Every time the alert changes, you will get it again. Did you try acking the
alerts after updating them?
So all i did was to move my acknowledge to after the changes has been done.
something like this:
if (alerts.Count > 0)
foreach (var alert in alerts)
//Send the alert to the other management system with the appropriate API
//from the other management system.
//Add a comment to the alert.
connector.AcknowledgeMonitoringAlerts(alerts);
Best Regards
Jakob Gottlieb Svendsen
Trainer/Consultant - Coretech A/S -
Blog
MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click
here

Similar Messages

  • Email not updating automatically and no alert sounds since update.

    Email was updating automatically before with no problem and alerting me with each new email.  Since update I have to update manually and no alerts are coming through.  Have checked my settings and everything seems to be fine.  Any suggestions???

    im not sure of a way to go in there and set it to automatically update. but i had that problem with some games and when i went to manually update them i scrolled down a little and it gave me the option to check a box to allow it to automatically update. you can check for updates in settings>about phone>system updates.

  • I have a question regarding my txt/alert tones. I recently updated my iPhone 5's software without first backing it up on iCloud or my computer (oops). After my phone finished updating, i lost the new ringtones and txt/alert tones i had bought.

    I have a question regarding my txt/alert tones. I recently updated my iPhone 5's software without first backing it up on iCloud or my computer (oops). After my phone finished updating, i lost the new ringtones and txt/alert tones i had bought. I connected my iPhone to my computer and sync'd it hoping that it could download my purchases from the itunes store and then put them back on to my phone but no such luck. When i look at my iphone on my computer and look at tones, they do not show up at all. However, if i click on the "On This iPhone" tab and click on "Tones" the deleted ringtones and altert tones show up...they are just grey'd out and have a dotted circle to the left of them. I also tried to go to the iTunes store on my phone and redownload them and it tells me that i have already purchased this ringtone and asks me if i want to buy it again. I press Cancel. I know when i do that with music it would usually let me redownload the song without buying it again but it wont let me with the ringtones...so how do i get them back? any help would be greatly appreicated

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • My iPod is stuck on the USB connector towards the iTunes snd on cd, and I updated it and now it's saying my iPod has apasscode when it's still stuck on that USB screen... What do I do????

    My iPod is stuck on the USB connector towards the iTunes snd on cd, and I updated it and now it's saying my iPod has apasscode when it's still stuck on that USB screen... What do I do????

    you can do is go to ijailbreak.com then select downloads section.......scroll down and see the latest version of ipod touch second generation is available for download.....when it gets downloaded connect your iPod to itunes or keep it connected then hold option and click restore (mac) search the software by writing in search "iPod" a thing with white cube will show up if it is the file you just downloaded click it and wait for itunes to do its work......you can ask more if you are on windows

  • How can I get iCloud on my PC to 1) update my new e-mail automatically and 2) alert me to new e-mails?

    I've started using iCloud on my PC to manage my e-mail / calendar / reminders, because Outlook stopped syncing correctly with my iPhone.  However, it seems like to the only way I can get iCloud on my PC to update my e-mail is to select the Get Mail icon at the bottom left of the email screen. 
    How can I get iCloud to 1) update my e-mail automatically and 2) alert me to the arrival of the new e-mail?

    The issue here is an expectation the program will or can do something when it is not running. (At least I think that is what your saying.
    I leave Thunderbird running for days at a time, as it does not clof up my task bar, simply leaving a rectangle around it's icon on the task bar.
    while running like this is puts up new mail notifications a small box in the bottom right of the screen and places an icon in the notification area on the task bar.
    What happens to this options I have no idea in Windows 8. I bought it but never installed it because it would not boot to the desktop. But as Windows 8 still has a taskbar, I assume they all do exactly the same things.

  • After iOS7.2 update my iPhone 4S will no longer feel the volume of the video and sound alerts. Why?

    after iOS7.2 update my iPhone 4S will no longer feel the volume of the video and sound alerts. Why?

    http://support.apple.com/kb/TS2802

  • I am getting a service start and stop alert while doing the windows server updates.

    HI
    I am getting a service start and stop alert while doing the windows server updates. Services are wmiApSrv , WPDBusEnum. Can you please help me to under stand why i am getting the service start and stop alert.
    Thanks & Regards
    Abhilash K Joy

    Hi,
    The WMI Performance Adapter (wmiApSrv) service provides performance library information from Windows Management Instrumentation (WMI) providers to clients on the network. This service only runs when Performance Data Helper is activated.
    This service is installed by default and its startup type is Manual. When started in the default configuration it will log on using the Local System account.
    You can try troubleshooting the issue using Clean Boot to check if the issue is related to third-party software.
    How to perform a clean boot in Windows
    http://support.microsoft.com/kb/929135/en-us
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Two part q: sysman login and clearing alerts

    Oracle 11.2.0.1.0 SE-One on OL 5.6 64bit
    Just got this configured a few days ago. Opened dbcontrol this morning and found a boat-load of messages about failed log on attempts (ie: 170 failed attempts in last 30 minutes) Checked DBA_AUDIT_LOG and see that the failed attempts are coming from SYSMAN. Followed note 259379.1 concerning changing the password for sysman - to a known value. Failed logon attempts continue (as shown in dba_audit_log).
    It seems that in 10.2 (I don't have one handy at the moment) dbcontrol had a facility to clear/acknowledge alerts, but I don't find that on the 11.2 console. ??
    What else might I need to do to to prevent the failed connections from SYSMAN?

    Loc Nhan wrote:
    >
    It seems that in 10.2 (I don't have one handy at the moment) dbcontrol had a facility to clear/acknowledge alerts, but I don't find that on the 11.2 console. ??
    >
    - From the console home page, click one of the alert messages; e.g. click "There have been 170 failed attempts in last 30 minutes".
    - The Failed Login Count: Time <date/time> page should appear with breadcrumbs similar to this:
    Database Instance: <Instance_name> > All Metrics > Failed Login Count >
    - Click "Failed Login Count" in the breadcrumbs. From the next page, you should be able to select (open) alerts to clear.
    >
    What else might I need to do to to prevent the failed connections from SYSMAN?
    >
    If there are UDMs (user-defined metrics) and/or jobs using sysman's credentials, make sure that they are not failing due to an invalid password.
    Regards,
    - LocWell, the plot thickens. Before starting up the dbconsole, I double-checked the config directories in $ORACLE_HOME, and find I have TWO configs for this one instance:
    drwxr-----  3 oracle oinstall  4096 Jul 20 15:18 mymachine.mydomain_orcl
    drwxr-----  3 oracle oinstall  4096 Aug  1 12:18 mymachine.mydomain_ORCLThe dbcontrol home page for this instance seems to indicate we are using the config in upper case - the "Database Instance:" in the upper right corner shows ORCL - in upper case.
    I'm not sure how I got here. In the past I've always created my dbcontrols at the command line, using emca, but for this one decided to try it dbca. I'll use emca to drop it, make sure everything is clean, and recreate.
    BTW, the error messages are not selectable -- that is, they are not live links and clicking on them does nothing.
    I"ll update after I've recreated the dbcontrol.

  • How to update link and import data of relocated incx file into inca file?

    Subject : <br />how to update link and import data of relocated incx file into inca file.?<br />The incx file was originally part of the inca file and it has been relocated.<br />-------------------<br /><br />Hello All,<br /><br />I am working on InDesignCS2 and InCopyCS2.<br />From indesign I am creating an assignment file as well as incopy files.(.inca and .incx file created through exporing).<br />Now indesign hardcodes the path of the incx files in inca file.So if I put the incx files in different folder then after opening the inca file in InCopy , I am getting the alert stating that " The document doesn't consists of any incopy story" and all the linked story will flag a red question mark icon.<br />So I tried to recreate and update the links.<br />Below is my code for that<br /><br />//code start*****************************<br />//creating kDataLinkHelperBoss<br />InterfacePtr<IDataLinkHelper> dataLinkHelper(static_cast<IDataLinkHelper*><br />(CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss)));<br /><br />/**<br />The newFileToBeLinkedPath is the path of the incx file which is relocated.<br />And it was previously part of the inca file.<br />eg. earlier it was c:\\test.incx now it is d:\\test.incx<br />*/<br />IDFile newIDFileToBeLinked(newFileToBeLinkedPath);<br /><br />//create the datelink<br />IDataLink * dlk = dataLinkHelper->CreateDataLink(newIDFileToBeLinked);<br /><br />NameInfo name;<br />PMString type;<br />uint32 fileType;<br /><br />dlk->GetNameInfo(&name,&type,&fileType);<br /><br />//relink the story     <br />InterfacePtr<ICommand> relinkCmd(CmdUtils::CreateCommand(kRestoreLinkCmdBoss)); <br /><br />InterfacePtr<IRestoreLinkCmdData> relinkCmdData(relinkCmd, IID_IRESTORELINKCMDDATA);<br /><br />relinkCmdData->Set(database, dataLinkUID, &name, &type, fileType, IDataLink::kLinkNormal); <br /><br />ErrorCode err = CmdUtils::ProcessCommand(relinkCmd); <br /><br />//Update the link now                         <br />InterfacePtr<IUpdateLink> updateLink(dataLinkHelper, UseDefaultIID()); <br />UID newLinkUID; <br />err = updateLink->DoUpdateLink(dl, &newLinkUID, kFullUI); <br />//code end*********************<br /><br />I am able to create the proper link.But the data which is there in the incx file is not getting imported in the linked story.But if I modify the newlinked story from the inca file,the incx file will be getting update.(all its previous content will be deleted.)<br />I tried using <br />Utils<IInCopyWorkflow>()->ImportStory()<br /> ,But its import the incx file in xml format.<br /><br />What is the solution of this then?<br />Kindly help me as I am terribly stuck since last few days.<br /><br />Thanks and Regards,<br />Yopangjo

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • One thread adding/updating value  and other thread getting values....issue

    am using a spring bean (singleton) and this is how it looks like
    public class MySingletonService {
    private Map<String, List<TaskVO>> alerts = new HashMap<String, List<TaskVO>>();
    //spring will call this method every 15 minutes
    public void pollDatabase() {
    //initialize the alerts instance variable and create/fill the alerts instance variable with new alerts for the employee(from database) .The key for the hashmap is the employee id
    //some client code (e.g. GUI) will call this method to get the alert for the operator id.This can be called anytime to get the latest info from the alert Map
    public List<TaskAlertVO> getOutstandingAlerts(String operatorId) {
    return alerts.get(operatorId);
    The issue here is that when getOutstandingAlerts is invoked by a thread,some other thread(Spring) calling the pollDatabase method might be updating the value.Please give me some idea and solution to get around this issue.
    I was thinking of creating a copy of alerts instance variable in the getOutstandingAlerts method and then use the copy to find the key and return the alert for that operator id.This way we dont have to worry about data conflict.
    Please advice

    Manjit wrote:
    jtahlborn wrote:
    if the pollDatabase() method is getting a complete new copy of the alerts every time, and the alerts map isn't being modified at all after load, then you can just:
    - make the alerts member variable volatible
    - create a new HashMap each time pollDatabase() is called, fill it in, and then assign it to the alerts member variable. Jtalhorn,I think I got your point.Basically you are suggesting that by creating a brand new map in each pollDatabase operation, then I dont have to worry about get operation ,simply because the client code is still looking at old memory location(old copy) and hence should not worry about values getting changes by pollDatabase method.
    I got it.
    But the small doubt is that why even I should bother about making the instance variable volatile ? Your suggestion should work without making it volatilebecause volatile ensures correct memory visibility between threads. if you didn't use volatile, then a caller to getOutstandingAlerts() could see some partially initialized/corrupt version of the map.

  • My iphone4 is not working after I tried to update it and it wont let me restore it?

    My husbands iphone 4 is refusing to restore or really do anything since he tried to update it to the new operating system. It just alternates between the apple sign, and the thinking circle.  I updated mine on the computer right before he tried so we know its not the computer settings. I updated itunes and went through the trouble shooting guides.  It was not connecting with itunes at all so I updated the device connector.  Now it will connect sometimes as an unknown iphone but will not let me restore it and says it is a (-1) error. What should I do? Apple support was supposed to call an hour ago and still hasnt called.

    I had the same problem, I connected to a different computer that had itunes. It also was oneI never connected to before. I held the power botton and homebutton till it showed up connect to itunes. I opened up it tunes and it said my phone needed a phone software update, i folled the prompt and set it up as a new phone. Then i resored it, then put it on the computer u usually sync it on and restore it to a date the phone was working to, this helped me, if u want i can help u over the phone if u cant get it, let me know and i will send u my number over my email address, hope it works, basically i swiped the phone clean and reinstalled all software by taking these steps

  • Inbound Delivery Idoc not update PIC and PGI with split batch.

    Dear Experts,
    Delivery outbound with split batch send to third party Warehouse to PIC and PGI from SAP, then receive the delivery inbound IDOC to update the PIC and PGI in SAP from third party. Basic Idoc DELIVERY03 it's works fine with out split batch, with split batch it's not updating PIC and PGI at the same time no error. Please advice on this
    E1EDL24-HIPOS = "HIGHER LEVEL ITEM NUMEBR"
    E1EDL24-HIEVW = "VALUE 1"
    E1EDL19-QALF = "BAS"
    Thanks and Regards,
    Thiru.

    Hi,
    You also have to create a segment with following data as well (for batches).
    E1EDL19-QUALF = "QUA".
    Cheers,

  • Installed Win 8.1 update 1 and still cannot open Linksys Smart Wi-Fi EA4500

    I am running the EA4500 Router with IE11,Windows 8.1 update 1-64 bit,12GB memory,1TB HDD. At first I could not view my router's settings via IE11 because I received an alert that it neded to be updated. I switched to Google Chrome and everything worked ok. This was before installing udate1(KB2919355). Sometime later,I received the same error message for Chrome. I immediately updated it and it worked. I have updated IE11 and it is not working. Has Linksys updated its routers to recognize updated browsers? Thanks.

    There is no uninstalling IE11 and reverting to IE10 on windows 8.1, IE11 is the lowest
    BTW I also notice that so called "Smart Wi-Fi" is identifying my Windows 8.1 as a Windows XP device

  • My iphone calendar keeps changing the alert and second alert times I put in

    Ever since updating to 7.0.2, my Iphone calendar keeps changing the alert and second alert times I input for an event to different times. Why is it doing this and how can I fix it?

    Are you syncing your phone with iTunes and then with iCloud? This can cause duplicates. Sync with one or the other, but not both.

  • Updating MSC2N and MSC1N

    Hi,
    When Material Document is posting, the Z FM is triggering (called Dynamically),
    Z Function Module is creating Outbound IDOC.
    In the Z Function Module, Iu2019m updating MSC2N and Creating Batch (MSC1N).
    When I use Call transaction, itu2019s giving Dump and saying Call transaction and Submit are not possible (Will not trigger) in Update task.
    When I use BAPI (BAPI_BATCH_CHANGE), itu2019s saying Commit work will not trigger in Update Tasku2026.
    Session method is working, but they donu2019t want to run the session.
    Can any one please help regarding thisu2026.
    Thanks
    BAlu

    Hi ,
         Your Z FM module should not be an update task program .
    it should be normal function module then you can call the BAPI_BATCH_CHANGE.

Maybe you are looking for

  • Video chat does not work.

    Ive read countless posts and mine sounds about the same as everyone else's except one thing. I just bought a brand new Macbook last week. I do not have a .Mac account so I use my AIM screen name. My boyfriend also has a brand new Macbook but his is a

  • Save report as pdf in the database

    Hi all, is it possible to save the generated pdf from reports10g in the database? Regards

  • IOS 6 has messed up my phone, what do i do?

    I've literally just plugged my Iphone 4s in opened iTunes to update it, it got to the final stages of the update when it decided to stop and tell me the phone had been reset to the factory settings and then asked if i wanted to restore it, which didn

  • Dreamweaver HTML Code view too small since Mac OS X 10.6.3

    Has anyone run into this issue, since I loaded Snow Leopard my HTML code files viewed in Dreamweaver are so small and hard to read. The CSS files are just fine and a normal size. I have not found a way to increase the size of the view and that featur

  • How to display song time in minutes/seconds??

    I know that there is a very simple answer to this however, I cannot find it... Is there a way to display the song time in minutes/seconds rather than SMPTE clock in the transport?? Thanks