M365 service health

I was wondering if someone has been able to get this up and running and if so can provide an image how it looks. I do get an error after activating it.

Some GUI extensions could not be loaded. This may be caused by some incompatible extension packages.

Loading “wato/m365_service_health” failed: cannot import name ‘RulespecGroupVMCloudContainer’ from ‘cmk.gui.plugins.wato.datasource_programs’ (/omd/sites/white/lib/python3/cmk/gui/plugins/wato/datasource_programs.py)

https://exchange.checkmk.com/p/m365-service-health

Hi @planet4,

what Checkmk version are you using? Maybe I need to tweak the mkp

Gerd

Latest. Just upgraded today. 2.2.0p14

hm ok - I think the mkp simply wasn’t adapted for 2.2 yet… I’ll hopefully find time on monday to fix this, thanks for the info :slight_smile:

1 Like

Sorry for taking so long, it’s such a minor (1 import) change, but anyhow… fix for 2.2 is available :slight_smile: upload to exchange.checkmk.com pending
m365_service_health-1.2.1.mkp (5.4 KB)

Thanks. Seems to work. Added the mkp and configured tennant/secret etc. But not really sure what should happen. Should they appear in the assiged host as a service?

Hi @planet4,

yes, if you have the rule assigned to a host + the host is configured to use API configuration in the “Checkmk agent / API integrations” tag, then you should discover around 37 new services :slight_smile:

Gerd

Strange. Added a new dummy host now but get:

[special_m365_service_health]: TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’

can you run the special agent from the cli to get the full error? You can get the CLI by running

“cmk -D <host_you_assigned_the_checks_to> | head -n 15”

when sharing the output, please make sure to obfuscate your secrets :wink:

I got this. I am running the appliance.

O365
Addresses:              0.0.0.0
Tags:                   [address_family:ip-v4-only], [agent:cmk-agent], [criticality:prod], [networking:lan], [piggyback:auto-piggyback], [site:white], [snmp_ds:no-snmp]
Labels:                 [cmk/site:white]
Host groups:            check_mk
Contact groups:
Agent mode:             No agent
Type of agent:
  Process piggyback data from /omd/sites/white/tmp/check_mk/piggyback/O365
  PING only
Services:
  checktype item params description groups
  --------- ---- ------ ----------- ------
OMD[white]:~$

I think something went wrong, is “O365” (case sensitive) the actual host name in checkmk? than you should see a proper line including “special/agent_m365_service_health” under “Type of agent”

Sorry. Did a typing error. It looks like this.

M365
Addresses:              127.0.0.1
Tags:                   [Deployment:Production], [Hosttype:Server], [Location:Azure], [address_family:ip-v4-only], [agent:special-agents], [criticality:prod], [hostinfo:Unknown], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [platform:nothing], [site:white], [snmp_ds:no-snmp], [tcp:tcp], [virtual:No]
Labels:                 [cmk/site:white]
Parents:                CLOUD
Host groups:            Azure, Whitearkitekter
Contact groups:         tod, all
Agent mode:             No Checkmk agent, all configured special agents
Type of agent:
  Program: /omd/sites/white/local/share/check_mk/agents/special/agent_m365_service_health --tenant xxxxxxxxxxxxxxxxxxxxxx --client xxxxxxxxxxxxxxxxxxxxxx '--secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  Process piggyback data from /omd/sites/white/tmp/check_mk/piggyback/M365
Services:
  checktype item params description groups
  --------- ---- ------ ----------- ------
OMD[white]:~$

I might have made a little GUI config error and have not flagged the option “Number of days to look back for old issue messages” as mandatory - can you set a value for that and see if that helps? (currently on the road and can’t reproduce it.)

Long time now but was just able to test this again. I changed number of days but still do not get any usefull info.

OMD[white]:~$ cmk -D M365 | head -n 15

M365
Addresses:              127.0.0.1
Tags:                   [Deployment:Production], [Hosttype:Server], [Location:Azure], [address_family:ip-v4-only], [agent:special-agents], [criticality:prod], [hostinfo:Unknown], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [platform:nothing], [site:white], [snmp_ds:no-snmp], [tcp:tcp], [virtual:No]
Labels:                 [cmk/site:white]
Parents:                CLOUD
Host groups:            Azure, Whitearkitekter
Contact groups:         all, tod
Agent mode:             No Checkmk agent, all configured special agents
Type of agent:
  Program: /omd/sites/white/local/share/check_mk/agents/special/agent_m365_service_health --tenant xxxxxxxxxxxxxxxxx --client xxxxxxxxxxxxxxxxx --issue_days 15 '--secret=xxxxxxxxxxxxxx'
  Process piggyback data from /omd/sites/white/tmp/check_mk/piggyback/M365
Services:
  checktype item params description groups
  --------- ---- ------ ----------- ------

@planet4 Did you find a solution? I have the same issue…

using checkmk v.2.1.0p40
tested with extension v.1.1.0 and v.1.2.1

M365
Addresses: 127.0.0.1
Tags: [address_family:ip-v4-only], [agent:special-agents], [criticality:prod], [eskalation:none], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [site:black], [snmp_ds:no-snmp], [tcp:tcp]
Labels: [cmk/site:black]
Host groups: check_mk
Contact groups: check-mk-notify, all
Agent mode: No Checkmk agent, all configured special agents
Type of agent:
Program: /omd/sites/black/local/share/check_mk/agents/special/agent_m365_service_health ‘–tenant’ ‘X’ ‘–client’ ‘X’ ‘–issue_days’ 11 ‘–secret=X’
Process piggyback data from /omd/sites/black/tmp/check_mk/piggyback/M365
Services:
checktype item params description groups


Found the solution.
in app registration → API permissions:
Add ServiceHealth.Read.All

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.