Menu

UI vs. SOAP (Nagios) incident creation

Sylvain B.
2011-07-20
2012-12-19
  • Sylvain B.

    Sylvain B. - 2011-07-20

    Hi,

    We successfully plugged Nagios with iTop, thanks to the given tutorial.
    For that purpose, I created a new Team, plus a Service and a Service Subcat.

    It does work perfectly when using SOAP/PHP : we can see in the output there is match in between what we give and what it founds.
    I doesn't work when using directly iTop UI (UI.php) : when looking at the new Incident page, it doesn't show up my previously created Service and Workgroup. Instead, I only have choice to create a new Service and a new Workgroup.

    Can you please help me and tell me what's wrong ?

    I also looked at MySQL tables, and I'm able to see my previously created entities.

    Thanks.

     
  • Sylvain B.

    Sylvain B. - 2011-07-22

    OK, I found the reason.

    Incident model is inherited from ResponseTicket model, which is defining which Service and Workgroup to show up.
    "allowed_values"=>new ValueSetObjects('SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id =:this->org_id')
    "allowed_values"=>new ValueSetObjects('SELECT Team AS t JOIN CustomerContract AS cc ON cc.support_team_id=t.id JOIN lnkContractToSLA AS ln ON ln.contract_id=cc.id JOIN SLA AS sla ON ln.sla_id=sla.id WHERE sla.service_id = :this->service_id AND cc.org_id = :this->org_id')

    These OQL queries are fairly different from the ones given by the SOAP model : there, there is a need to define Customer Contract, SLA and associations accordingly.
    As I wasn't having created neither SLA nor Customer Contract, the OQL statement was returning no Services.

    I then created what was required, and now I can see everything is fine.

    I strongly suggest to put help somewhere explaining the strong relations, or provide some failback-OQL if no Contract is defined.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.