Monday, October 30, 2017

Troubleshooting sharepoint alerts

Method for determining what happens with sharepoint alerts from the serverside.


  1. To determined which server is sending the mail.
    (Note that this will be different for different webapps, so best is to monitor the whole farm with ULS)
    run Sysinternals procmon on all servers (usually only the frontends) monitor traffic for :25
  2. Activate verbose logging for alerts
  3. Monitor ULSViewer on specific member or the whole farm for events matching below
    Category contains "Alerts" AND Message contains "Alert for" OR Message contains "Successfully sent"
Now ULS messages will show successfull and failed (based on securityfiltering) sent emails.

References:
https://blogs.technet.microsoft.com/steve_chen/alerts-in-sharepoint-troubleshooting-mosswss/
http://sharepointalert.info/troubleshooting-sharepoint-alerts/
http://www.sharepointdiary.com/2012/02/sharepoint-alerts-not-working-troubleshooting-checklist.html

Sunday, October 01, 2017

Openhab2 with telldus tellstick duo

The complete steps to get up and running with a raspberry3, openhab2 and telldus tellstick for managing lights.

  1. Install sdcard with image openhabian using win32 diskimager 
  2. Logon raspberry with openhabian:openhabian using putty
  3. Set new password with passwd
  4. Set static ip
    1. sudo nano /etc/dhcpcd.conf  (insert your own ip)
      interface eth0
      static ip_address=192.168.0.10/24
      static routers=192.168.0.1
      static domain_name_servers=192.168.0.1
  5. Update software
    1. sudo apt-get update 
    2. sudo apt-get upgrade
  6. Goto yourip:8080 , and choose standardpackage.
  7. Start a new sitemap.config  for example default.sitemap in /etc/openhab2/sitemapsEasiest way to open explorer and go to \openhab-confsitemap default1 label="Main menu" {
     Frame {
             Text label="Information" {
             Text item=Cpu_Load label="System load"              
           }
    Text label="Inställningar" icon="office" {
    Switch item=Scene5                                      
    }
     }
    }
    End example
  8. Telldus support
    1. Add to /etc/apt/sources.list
      deb
      http://download.telldus.com/debian/ stable main
    2. Add public key
      wget -q
      http://download.telldus.se/debian/telldus-public.key -O- | sudo apt-key add -
    3. Update repository
      sudo apt-get update
    4. Install telldus-core
      sudo apt-get install telldus-core
    5. Add devices in /etc/tellstick.conf  . Se example belowdevice {
                              id = 3
                              name = "Vardagsrum:rodlampa"
                              controller = 0
                              protocol = "arctech"
                              model="selflearning-switch"
                              parameters {
                              house="7778459"
                              unit="3"
                             }
                          }
  1. Train your devices with tdtool --learn 3 (where 3 is deviceID)
    Unplug nexadevice and run command, when system blinks its connected.
  2. Restart telldus services
    sudo /etc/init.d/telldusd restart - starta om telldus tjänster
  3. Install Tellstick bindings in paperUI
  4. Add all things that show up
  5. Create item from each things switchchannel and add to sitemap
  1. install bindings Weatherinfo for local temperatures and weather
    1. Install Eclipse IoT marketplace under Addons>bindings>misc
    2. Install weatherunderground
    3. Configure thing with location key (that you get att weatherunderground) and location. Works best with bigcitys like Sweden/Gotenburg
  2. To allow for js-scripts.
    1. Install JS transform
    2. Install RegEx Transformation
    3. Put scripts in /transform-folder
  3. To allow execs (running bash or commands like restart)
    1. Install exec-binding
  4. To get systeminfo stuff like cpuload
    1. Install binding SystemInfo
    2. Associate things with items
    3. Add items to sitemap
  5. To get sunstate
    1. Install Astro bindings
    2. Add things with your location as position.
    3. Create items that you link on sitemap
    4. Set category to good icons , like Moon
    5. To get phases to show, use formatting in label" [MAP(astro.map):%s]"
  6. To format dates in sitemap
    1. Show only hours, add to label [%1$tH:%1$tM]
      Example label="Soluppgång [%1$tH:%1$tM]"

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...